My Notes
- Largest rectangle in histogram, max amount of trapped rain water
- When to use what sorting algorithm, why most of time quick sort is better than merge and heap sort
- Some good algorithms based upon trie
- Shortest string containing all 4-digit number (0000-9999, De Bruijn sequence)
- DP to minimize cost of cutting logs
- Print out all numbers containing 5 for a given n (groupon)
- Construct a long string by repeating a short string (amazon)
- Fib series in O(logn)
- Huffman code
- Given two sorted array M and N with size m and n, each time pick one number from M and one number from N and add them them. Try to find the k smallest sum (given two ascending sorted array A and B)
- Dutch national flag problem
- Given an int array, find out if there exist 3 ints that can be used to contruct a triangle in O(nlogn). (51. google interview (3 numbers to form triangle))
- Given a set of movie starting / ending times, find out at most how many movies can be watched without conflict. Is that a graph problem? (51. google interview (reasonable but also requires some work))
- K-d tree to find out nearest neighbor in a given points set
- Given n x n matrix with increasing rows and columns, find out k-th smallest element in O(nlogn)
- 平面N个点,找两点连线正好把点分到两半
- Given a function of "int Read4096(char * buf)" implement "int ReadBytes(char * buf, num_bytes)"
- Sort linked list (better use merge sort rather than quick sort)
- Mirror a BT
- Count reverse ordered pair
- stackoverflow
- (53. facebook interview (how to use reverse ordered pair))
No comments:
Post a Comment