-
find the most repeated number in a binary search tree(not a traditional binary search tree)
follow up: if we know there are N nodes in the tree in total, how can you optimize the code? (based on your code)
-
decode ways (DFS -> memorization -> DP)
-
Project deep dive + behavior + move zeros
-
Find the next smallest larger permutation (not the next permutation), if there is no such permutation, you should throw exception(ask to clarify).
- find all permutation of a string (non-duplicate + duplicate)
- System design
Imagine you are a hacker and you have 10k machines. Given a url http://example.com and you have to downloads all the pages that link to this url. There could be potentially 1 billion pages. Design a system such that it satisfies these requirements. (面试官并没有提crawler这个词=.=|)
-
Minimize the time that download all pages.
-
Best utilize the network bandwidth resource.
-
Minimize Storage