Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. 算法问题其实是production 环境下遇到的问题的简化版
- 2. 刷题的时间维度,尽量缩短战线:[30,45] days
- 3. 整个过程中要不断复习,包括System design 和 Behavioral questions
- 4. 语言要从一而终,选了Java就要一直用下去。
- 5. Leetcode最好的答案一般在 High-voted solution -> Top comments
- 6. 一定要刷高频题!!!按照Frequency 和 Company Tag刷!!!
- 7. 一定要写结题报告,记录自己的thinking process 方便自己复习,每次重新刷这道题就要refine解题报告。
- 8. 5个必须掌握的Data structure:
- 1. LinkedList,
- 2. Stack&Queue,
- 3. Binary Tree,
- 4. HashTable
- 5. Heap & Graph
- 9. 5个必须掌握的算法:
- 1. Binary Search
- 2. Divide and merge
- 3. DFS & BFS
- 4. QuickSort & MergeSort
- 10. 6个面试的Category:
- 1. Binary Search
- 2. BFS/DFS
- 3. LinkedList
- 4. Array
- 5. Data structure的实现
- 6. DP (通过Top-Down memorization search)或者战略性放弃。
- 11. 面试时候的tips
- 1. 能用BFS尽量BFS,一般有的Follow up会要求不用recursion。
- 2. Lead the conversation,主导整个面试过程
- 3. 听完面试官的题目描述一定要重新用自己的语言rephrase requirement
- 4. Rephrase后还要写几个concrete example检验自己理解是正确的
- 5. 最重要的是证明自己可以一点点都优化方案
- 6. 写代码的时候用Top Down Method
- 1. Finish the top-level logic first. 这一点可以在平常的刷题中练习,先写最重要的部分最后实现基础的部分。
- 2. 一些可以被分割出来最后实现的部分:
- 1. Binary search
- 2. Palindrome validation
- 3. Edge detection
- 4. Result type and comparator
- 3. Guard 及时冗余也要做好input validation
- 4. Code based on test case,写好一个test input在旁边对照这个进行编程。
- 12. 几种不同的Follow up方式:
- 1. Addition Result: 要返回最长的字符串长度 -> 返回最长字符串本身
- 2. Extend Data: Array -> Stream, Static -> Dynamic
- 3. Extra Constraints: Remove Duplicate & Increase Loops
- 4. 只允许One Pass: Merge Sorted Array
- 5. 限制条件:不许sort,不许HashMap,No extra space, No recursion.
Add Comment
Please, Sign In to add comment