- [ ] Leetcode 148道题
- [ ] instant 面经
- [ ] watch this https://www.youtube.com/watch?v=oWbUtlUhwa8
- [ ] watch this https://www.youtube.com/watch?v=XKu_SEDAykw&t=300
- [ ] and this https://www.youtube.com/watch?v=55aEVvITNJ0&feature=em-u
- [ ] The followings are from this https://docs.google.com/document/d/1hxnrh7nm24IqtFXsSQqwv4Arx4cxlD9t29cfpKQRRx8/edit
[ ] Sorting:Know how to sort. Don't do bubble-sort. You should know the details of at least one n*log(n) sorting algorithm, preferably two (e.g. quicksort and merge sort). Merge sort can be highly useful in situations where quicksort is impractical, so take a look at it.
[ ] Hash Tables:Be prepared to explain how hash tables work and be able to implement one using only arrays in your favorite language in about the space of one interview.
[ ] Coding:You should know at least one programming language really well, preferably C++, Java, Python, Go, or C. You will be expected to know APIs, Object Orientated Design and Programming, how to test your code, as well as come up with corner cases and edge cases for code. Note that we focus on conceptual understanding rather than memorization.
[ ] Algorithms:Approach the problem with both bottom-up and top-down algorithms. You will be expected to know the complexity of an algorithm and how you can improve/change it. Algorithms that are used to solve Google problems include sorting (plus searching and binary search), divide-and-conquer, dynamic programming/memoization, greediness, recursion or algorithms linked to a specific data structure. Know Big-O notations (e.g. run time) and be ready to discuss complex algorithms like Dijkstra and A*. We recommend discussing or outlining the algorithm you have in mind before writing code.
[ ] Data Structures:You should study up on as many data structures as possible. Data structures most frequently used are arrays, linked lists, stacks, queues, hash-sets, hash-maps, hash-tables, dictionary, trees and binary trees, heaps and graphs. You should know the data structure inside out, and what algorithms tend to go along with each data structure.
[ ] Mathematics:Some interviewers ask basic discrete math questions. This is more prevalent at Google than at other companies because counting problems, probability problems and other Discrete Math 101 situations surround us. Spend some time before the interview refreshing your memory on (or teaching yourself) the essentials of elementary probability theory and combinatorics. You should be familiar with n-choose-k problems and their ilk.
[ ] Trees & Graphs:Study up on trees: tree construction, traversal and manipulation algorithms. You should be familiar with binary trees, n-ary trees and trie-trees at the very least. You should know at least one flavor of balanced binary tree, whether it's a red/black tree, a splay tree or an AVL tree and how it's implemented. More generally, there are three basic ways to represent a graph in memory (objects and pointers, matrix and adjacency list), and you should familiarize yourself with each representation and its pros and cons. Understand BFS and DFS tree traversal algorithms and know the difference between inorder, postorder and preorder traversal (for trees). You should be familiar with their computational complexity, tradeoffs and how to implement them in real code. If you get a chance, study up on fancier algorithms such as Dijkstra and A* (for graphs).
[ ] Recursion:Many coding problems involve thinking recursively and potentially coding a recursive solution. Prepare for recursion, which can sometimes be tricky if not approached properly. Use recursion to find more elegant solutions to problems that can be solved iteratively.
[ ] Operating Systems:You should understand processes, threads, concurrency issues, locks, mutexes, semaphores, monitors and how they all work. Understand deadlock, livelock and how to avoid them. Know what resources a process needs and a thread needs. Understand how context switching works, how it's initiated by the operating system and underlying hardware. Know a little about scheduling and the fundamentals of "modern" concurrency constructs.
[ ] System Design:Be able to take a big problem, decompose it into its basic subproblems and talk about the pros/cons of different approaches to solving those subproblems as they relate to the original goal.
[ ] Development Practices and Open-Ended Discussion:Sample topics include validating designs, testing whiteboard code, preventing bugs, code maintainability and readability, refactor/review sample code. Other topics: biggest challenges faced, best/worst designs seen, performance analysis and optimization, testing and ideas for improving existing products.