avatar
Home size# Living
s*f
1
面试了很多,有一个offer,不过没赶上H1B。我懒,一直没总结,多数问题板上都有。
慢慢更新帖子列出来,不列公司名。
1. 正则表达式匹配字符串,包含 *, ?
2. give u a function IsBad(item) and an array: good, good, .., bad, bad, ...
always bad, find out first bad
3. design a data structure, support 2 functions: Insert and GetMedian.
4. give a matrix, sorted as follow, M[i][col - 1] < M[i + 1][0]
1 3 4
5 6 8
10 14 16
write function: bool Find(int k)
5. linkedin经典format文本题,我居然没复习到,真得给h1b进度逼死了
6. write function: search(keywords). you have invert table, return top10
back with simple rank strategy.
7. strstr
8. system have 1 billion user, each user have hundreds of email addresses.
how to store them.
9. network concept, like flow control.
10. about testing large scare system
11. 螺旋打印
12. give "god like dog, not odg" and "dog", return "god", "dog" and "odg"
13. 树的宽度遍历
14. give an int array, sort it into: 1st biggest, 1st smallest, 2nd biggest,
2nd smallest, 3rd biggest, 3rd smallest, ....
15. 反转链表
16. 成对反转链表:1->2->3->4 to 2->1->4->3
17. give an int array, find 2 number a, b, so that a * b = k
18. multi merge sort
avatar
s*f
2
以前不是两年吗? 每年交360好烦呀。
avatar
h*0
3
Just got my appraisal report and felt quite puzzled about the home size.
假定:
A = living area size
B = garage size
C = Covered patio size
D = covered porch size
(1)listing information的home size是:A+B,我自己买的时候也是根据这个大小给
的offer。
(2)但是lender说home size 只是指 A 。那我的offer岂不是亏大了?
(3)但是appraiser做市场分析计算per sqft price的时候(就是跟相邻地段的房子比
较),用的size却是A+B+C+D.
到底在county record和 listing for sale 里面,应该是用哪个size?自己以后要卖
房子的时候应该用哪个size?
如果现在买的时候用的是A+B,到时候卖的时候只用A,那岂不是亏大了?
多谢任何信息。
avatar
m*l
4
baizi
你要eb1a材料么?

..

【在 s*******f 的大作中提到】
: 面试了很多,有一个offer,不过没赶上H1B。我懒,一直没总结,多数问题板上都有。
: 慢慢更新帖子列出来,不列公司名。
: 1. 正则表达式匹配字符串,包含 *, ?
: 2. give u a function IsBad(item) and an array: good, good, .., bad, bad, ...
: always bad, find out first bad
: 3. design a data structure, support 2 functions: Insert and GetMedian.
: 4. give a matrix, sorted as follow, M[i][col - 1] < M[i + 1][0]
: 1 3 4
: 5 6 8
: 10 14 16

avatar
b*r
5
1年之内绿卡应该拿到了吧,还要EAD干嘛?
avatar
a*w
6
A
avatar
k*t
7
赞面经。
14和17有没有要求Space O(1)? i.e. 用in-place的方法?
事实上有没有in-place的算法?
试了试14,在in-place 排序后,推了个下面的公式算新的index。
i=0不用动。i从1开始,in-place移动元素到目标位置,直到目标index又回到1。
但到i=2时,如何判定index 2处值是否已经在上一步移动就位,以避免重复移动?
(只比较同前面元素大小好像无法肯定。)
for index i=[0..n-1],
new index = i*2 if 2*i < n
= (n-1)-(2*i-n) if 2*i >=n
14. give an int array, sort it into: 1st biggest, 1st smallest, 2nd biggest,2nd smallest, 3rd biggest, 3rd smallest, ....
17. give an int array, find 2 number a, b, so that a * b = k

..

【在 s*******f 的大作中提到】
: 面试了很多,有一个offer,不过没赶上H1B。我懒,一直没总结,多数问题板上都有。
: 慢慢更新帖子列出来,不列公司名。
: 1. 正则表达式匹配字符串,包含 *, ?
: 2. give u a function IsBad(item) and an array: good, good, .., bad, bad, ...
: always bad, find out first bad
: 3. design a data structure, support 2 functions: Insert and GetMedian.
: 4. give a matrix, sorted as follow, M[i][col - 1] < M[i + 1][0]
: 1 3 4
: 5 6 8
: 10 14 16

avatar
s*f
8
但愿吧。

【在 b*********r 的大作中提到】
: 1年之内绿卡应该拿到了吧,还要EAD干嘛?
avatar
h*0
9
刚才犯了个乌龙错误。
原来Appraisor用的size就是A,而不是A+B+C+D。
看来我的appraisal多出来了20多个sqft。

【在 h********0 的大作中提到】
: Just got my appraisal report and felt quite puzzled about the home size.
: 假定:
: A = living area size
: B = garage size
: C = Covered patio size
: D = covered porch size
: (1)listing information的home size是:A+B,我自己买的时候也是根据这个大小给
: 的offer。
: (2)但是lender说home size 只是指 A 。那我的offer岂不是亏大了?
: (3)但是appraiser做市场分析计算per sqft price的时候(就是跟相邻地段的房子比

avatar
k*t
10
#3 GetMedian() 感觉写得有点复杂,insert()应该还可以简化。
==============
#include
#include
#include
#include
using namespace std;
class Median {
public:
Median() : maxhc(0), minhc(0) {}
~Median() {}
void insert (int v) {
if (maxhc==minhc) {
if (maxh.empty() || maxh.top()>=v)
_enQ(true, v);
else _enQ(false, v);
} else if (maxhc>minhc) {
if (maxh.top()>v) {
_enQ(false, _deQ(true));
_enQ(true, v);
} else {
_enQ(false, v);
}
} else {
if (v>minh.top()) {
_enQ(true, _deQ(false));
_enQ(false, v);
} else {
_enQ(true, v);
}
}

}
double getMedian () {
double ret;
if (maxhc==minhc) {
if (maxhc==0) ret=INT_MIN;
else ret=(maxh.top()+minh.top())*1./2;
} else if (maxhc>minhc) {
ret=maxh.top();
} else {
ret=minh.top();
}
return ret;
}
private:
priority_queue maxh;
priority_queue, greater > minh;
int maxhc, minhc;
void _enQ (bool isMax, int v) {
if (isMax) {
maxh.push(v);
maxhc++;
} else {
minh.push(v);
minhc++;
}
}
int _deQ (bool isMax) {
int ret;
if (isMax) {
ret=maxh.top(); maxh.pop();
maxhc++;
} else {
ret=minh.top(); minh.pop();
minhc--;
}
return ret;
}
};

..

【在 s*******f 的大作中提到】
: 面试了很多,有一个offer,不过没赶上H1B。我懒,一直没总结,多数问题板上都有。
: 慢慢更新帖子列出来,不列公司名。
: 1. 正则表达式匹配字符串,包含 *, ?
: 2. give u a function IsBad(item) and an array: good, good, .., bad, bad, ...
: always bad, find out first bad
: 3. design a data structure, support 2 functions: Insert and GetMedian.
: 4. give a matrix, sorted as follow, M[i][col - 1] < M[i + 1][0]
: 1 3 4
: 5 6 8
: 10 14 16

avatar
m*2
11

不是已经涨价到380了么.

【在 s********f 的大作中提到】
: 以前不是两年吗? 每年交360好烦呀。
avatar
B*1
12
http://www.ardendertat.com/2011/11/03/programming-interview-que

【在 k***t 的大作中提到】
: #3 GetMedian() 感觉写得有点复杂,insert()应该还可以简化。
: ==============
: #include
: #include
: #include
: #include
: using namespace std;
: class Median {
: public:
: Median() : maxhc(0), minhc(0) {}

avatar
c*o
13
刚交的
380
一年
avatar
s*f
15
h1b没cap,还有办法?

【在 m*******l 的大作中提到】
: baizi
: 你要eb1a材料么?
:
: ..

avatar
s*f
16
in place seems hard and I have no idea. STL use rotate for inplace merge
sort, maybe we can get some ideas them but its really tricky.

【在 k***t 的大作中提到】
: 赞面经。
: 14和17有没有要求Space O(1)? i.e. 用in-place的方法?
: 事实上有没有in-place的算法?
: 试了试14,在in-place 排序后,推了个下面的公式算新的index。
: i=0不用动。i从1开始,in-place移动元素到目标位置,直到目标index又回到1。
: 但到i=2时,如何判定index 2处值是否已经在上一步移动就位,以避免重复移动?
: (只比较同前面元素大小好像无法肯定。)
: for index i=[0..n-1],
: new index = i*2 if 2*i < n
: = (n-1)-(2*i-n) if 2*i >=n

avatar
s*f
17
basically idea is maxheap + minheap as u, but can be simpler.
i lost in this problem, though i figured it out at last.

【在 k***t 的大作中提到】
: #3 GetMedian() 感觉写得有点复杂,insert()应该还可以简化。
: ==============
: #include
: #include
: #include
: #include
: using namespace std;
: class Median {
: public:
: Median() : maxhc(0), minhc(0) {}

avatar
k*t
18
8. system have 1 billion user, each user have hundreds of email addresses.
how to store them.
这题用什么?distributed hash table? Anything else?

..

【在 s*******f 的大作中提到】
: 面试了很多,有一个offer,不过没赶上H1B。我懒,一直没总结,多数问题板上都有。
: 慢慢更新帖子列出来,不列公司名。
: 1. 正则表达式匹配字符串,包含 *, ?
: 2. give u a function IsBad(item) and an array: good, good, .., bad, bad, ...
: always bad, find out first bad
: 3. design a data structure, support 2 functions: Insert and GetMedian.
: 4. give a matrix, sorted as follow, M[i][col - 1] < M[i + 1][0]
: 1 3 4
: 5 6 8
: 10 14 16

avatar
r*1
19
" linkedin经典format文本题" 是啥题目啊? 我搜不出来。麻烦提示下。

..

【在 s*******f 的大作中提到】
: 面试了很多,有一个offer,不过没赶上H1B。我懒,一直没总结,多数问题板上都有。
: 慢慢更新帖子列出来,不列公司名。
: 1. 正则表达式匹配字符串,包含 *, ?
: 2. give u a function IsBad(item) and an array: good, good, .., bad, bad, ...
: always bad, find out first bad
: 3. design a data structure, support 2 functions: Insert and GetMedian.
: 4. give a matrix, sorted as follow, M[i][col - 1] < M[i + 1][0]
: 1 3 4
: 5 6 8
: 10 14 16

avatar
s*f
20
need nosql solution. hadoop, cassandra, ...

【在 k***t 的大作中提到】
: 8. system have 1 billion user, each user have hundreds of email addresses.
: how to store them.
: 这题用什么?distributed hash table? Anything else?
:
: ..

avatar
k*t
21
DHT 和 NoSQL 到底什么关系?
memcached是一种NoSQL。
cassandra是基于Hadoop的MySQL吗?
。。。 。。。

【在 s*******f 的大作中提到】
: need nosql solution. hadoop, cassandra, ...
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。