d**f 发帖数: 264 | 1 死在第二次电面上,没有准备好
题都很常见
1.whether an int is power of two?
2.non-recursion Fibonacci serials.
3.count how many words in a string?
4.ransom notes
5.design a restaurant reservation system.
1.design a stack, push(), pop() and max() in O(1)
2.union two sorted int array
3.design a least recently used (LRU) cache systems. All operation in O(1). |
c***2 发帖数: 838 | 2 ransom notes?
what's that? |
t*****j 发帖数: 1105 | 3 绑架做报纸小条
【在 c***2 的大作中提到】 : ransom notes? : what's that?
|
g******d 发帖数: 511 | 4 3.design a least recently used (LRU) cache systems. All operation in O(1).
这题我一直没有好的答案,哪位指点一下?
【在 d**f 的大作中提到】 : 死在第二次电面上,没有准备好 : 题都很常见 : 1.whether an int is power of two? : 2.non-recursion Fibonacci serials. : 3.count how many words in a string? : 4.ransom notes : 5.design a restaurant reservation system. : 1.design a stack, push(), pop() and max() in O(1) : 2.union two sorted int array : 3.design a least recently used (LRU) cache systems. All operation in O(1).
|
s*****n 发帖数: 5488 | 5 那个是二面的题?
【在 d**f 的大作中提到】 : 死在第二次电面上,没有准备好 : 题都很常见 : 1.whether an int is power of two? : 2.non-recursion Fibonacci serials. : 3.count how many words in a string? : 4.ransom notes : 5.design a restaurant reservation system. : 1.design a stack, push(), pop() and max() in O(1) : 2.union two sorted int array : 3.design a least recently used (LRU) cache systems. All operation in O(1).
|
c*b 发帖数: 3126 | 6 这个存在吗?
即便是approximate LRU都做不到O(1)吧
).
【在 g******d 的大作中提到】 : 3.design a least recently used (LRU) cache systems. All operation in O(1). : 这题我一直没有好的答案,哪位指点一下?
|
s****1 发帖数: 135 | 7 是存在的,要再想另外的数据结构,我昨天也面的这道题
【在 c*b 的大作中提到】 : 这个存在吗? : 即便是approximate LRU都做不到O(1)吧 : : ).
|
d**e 发帖数: 6098 | 8 google一下才明白这是什么
那这题跟minimal cover是一样的意思吗?
【在 t*****j 的大作中提到】 : 绑架做报纸小条
|
c*b 发帖数: 3126 | 9 明白了,doubly linked list + hash map 可以做到,就是空间overhead稍有点大
http://www.careercup.com/question?id=243665
【在 s****1 的大作中提到】 : 是存在的,要再想另外的数据结构,我昨天也面的这道题
|
c*b 发帖数: 3126 | 10 PIE书上有详细解释
【在 d**e 的大作中提到】 : google一下才明白这是什么 : 那这题跟minimal cover是一样的意思吗?
|
|
|
s****1 发帖数: 135 | 11 对,就这样。早看见这个贴就好了,昨天人家提示了好几次才想出来的。。郁闷
【在 c*b 的大作中提到】 : 明白了,doubly linked list + hash map 可以做到,就是空间overhead稍有点大 : http://www.careercup.com/question?id=243665
|
s*******r 发帖数: 47 | 12 你咋申请的amazon? 我们学校amazon今年没来 |
d**f 发帖数: 264 | 13
后面的三个.
我估计面试官
其实没有问完.
【在 s*****n 的大作中提到】 : 那个是二面的题?
|
y***y 发帖数: 224 | 14 Why Double Linked List is required? Can we do that by using Single Linked
List? |
c*b 发帖数: 3126 | 15 Single Linked List不能做到O(1)时间内删除一个指定元素
因为没有prev指针
【在 y***y 的大作中提到】 : Why Double Linked List is required? Can we do that by using Single Linked : List?
|
y***y 发帖数: 224 | 16
谢谢.
【在 c*b 的大作中提到】 : Single Linked List不能做到O(1)时间内删除一个指定元素 : 因为没有prev指针
|