b**********r 发帖数: 91 | 1 Can't input Chinese, My situation was riding donkey and looking for
horse.
Interviewed several companies small or big, followings are some of the
questions as a return for what I benefit from here
(1) topological sort
(2) given an array of stock prices, find the best trading strategy.
(3) given a stream of points, find the top 10 points closest to the
origin
(4) given a BST, divide it by a given value
(5) print all the diagonals of a matrix
(6) check if 2 strings are anagram
(7) max subarray
(8) an int array with size n-1, values are between 1 to n without dup,
find the missing one
(9) check if a stream of bytes are all valid utf8
(10) design distributed queue
(11) design paid online video security feature
(12) design data structure for online music recognition (like MusicId)
(13) find the first common node of two single linked lists
(14) design a card game
(15) design the linkedin link recommendation feature
(16) given a sentence without space, split the words
(17) given a single linked list A->B->C->D->E->F, convert to A->F->B->E-
>C->D inplace and O(1)
(18) find how may unique lines in a large log file
(19) print BT by level
(20) producer/consumer problem
(21) implement a stack with pop, push and min operations
(22) given a phone number, find out all possible words from a dictionary
(23) calculate the number of ways to climb n stairs, each time can take
1, 2, or 3 steps
(24) given a graph, find all the nodes that is k steps away from a given
node
(25) K-way merge sort from k streams of input
(26) minimum comparison to find the max 2 elements from a unsorted array
(27) Find the longest substring x in S such that xx is also in S
(28) implement blocking queue
(29) given a set of chars with unknown order, given a sorted list of
strings, recover the order
(30) DB schema design for an online poker game
(31) Search m x n matrix inside a larger M x N matrix (m<=M, n <= N)
(32) Find the longest repeated sub string | g**e 发帖数: 6127 | 2 先顶再看
【在 b**********r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Can't input Chinese, My situation was riding donkey and looking for : horse. : Interviewed several companies small or big, followings are some of the : questions as a return for what I benefit from here : (1) topological sort : (2) given an array of stock prices, find the best trading strategy. : (3) given a stream of points, find the top 10 points closest to the : origin : (4) given a BST, divide it by a given value : (5) print all the diagonals of a matrix
| g**e 发帖数: 6127 | 3 大牛最后去了哪个firm?
【在 b**********r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Can't input Chinese, My situation was riding donkey and looking for : horse. : Interviewed several companies small or big, followings are some of the : questions as a return for what I benefit from here : (1) topological sort : (2) given an array of stock prices, find the best trading strategy. : (3) given a stream of points, find the top 10 points closest to the : origin : (4) given a BST, divide it by a given value : (5) print all the diagonals of a matrix
| y*******g 发帖数: 6599 | 4 (17) given a single linked list A->B->C->D->E->F, convert to A->F->B->E-
>C->D inplace and O(1)
这个怎么做到O(1)? | g**e 发帖数: 6127 | 5 如果递归也算O(1)的话
要不就用最土的方法
【在 y*******g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : (17) given a single linked list A->B->C->D->E->F, convert to A->F->B->E- : >C->D inplace and O(1) : 这个怎么做到O(1)?
|
|