Review data structure & algorithm
First: Cracking the coding interview
20/9
Chapter 1: The interview process
- Analytical skills
- Coding skills
- Technical knowledge / Computer Science fundamentals
- Experience
- Culture fit / Communication skills
Chapter 5: Behavioral questions
- Go through each of the projects or components of your resume and ensure that you can talk about them in detail.
Challenge - Mistakes/Failures - Enjoyed - Leadership - Conflicts - What You'd do Differently
Business problem - Analytics - How to implement
Chapter 6: Big O
Technique dynamic programming: memoization, tabulation.
Chapter 7: Technical questions
Listen -> Example -> Brute force -> Optimize (BUD: Bottlenecks, unnecessary work, duplicated work) -> Walk through -> Implement -> Test
Listen: information -> input/output, optimal keyword.
Brute force: space/time complexity and then dive into improvement.
Optimize:
1. Look for any unused information.
2. Use a fresh example.
3. Make time/space tradeoff.
4. Precompute information: Reorganize the data or compute some values upfront that will help save time in the long run.
5. Use a hash table.
6. Think about the best conceivable runtime.
Data structure brainstorm: a tree
Example: Numbers are randomly generated and stored into an array. How would you keep track of the median?
1. Linked list? Probably not -> not to do well with accessing and sorting numbers.
2. Array? Maybe. Could you somehow keep the elements sorted? That's probably expensive.
3. Binary tree?
4. Heap?
Nhận xét
Đăng nhận xét