https://github.com/chungchi300/headfirst-js-for-leetcode
headfirst js for leetcode
https://github.com/chungchi300/headfirst-js-for-leetcode
headfirst javascript leetcode-solutions
Last synced: over 1 year ago
JSON representation
headfirst js for leetcode
- Host: GitHub
- URL: https://github.com/chungchi300/headfirst-js-for-leetcode
- Owner: chungchi300
- License: other
- Created: 2019-04-17T01:04:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-09T01:43:17.000Z (almost 6 years ago)
- Last Synced: 2025-01-26T16:44:39.625Z (over 1 year ago)
- Topics: headfirst, javascript, leetcode-solutions
- Language: JavaScript
- Homepage:
- Size: 3.44 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Schedule
1. 400(already 103), all get answer(Know)
2. 250(Do All easy, remember classic answer by teaching)
3. 250(Do All Medium)
4. 250(Do All easy and medium)
1150
(One Day 10 question,3.5 hour per day)
# Level of correct level
1. Know related correct data structure&algorithm
2. Correct Thinking Method
3. Get the best solution
# Strategy
## Select Proper difficultly
Easy to medium(for question 1-400)
Facebook,Microsoft only use easy easy,medium topic in interview.
## Data structure based
### Normal and high frequency usage in daily life
1. Stack
2. Queue
3. Array
4. Hash Table
5. Math
6. String
7. Linked List
### Complex
1. Tree
2. Heap
3. Dictionary tree
## Method - 兔系
一上来就看答案,就照着答案写。这个做法看起来不靠谱,其实它有内在的合理性,刚开始刷 leetcode 重点不在于独立解题,而在于迅速把所有的题刷三到四遍,后面遇到新题就自然会有思路,可以迎刃而解了。
1. 第一遍:知道。直接看答案,不要自己想,了解所有最优解,方法技巧第一。做题套路,以印象为主。(I am current on this round)
2. 第二遍:熟悉。过 easy 题,记住;做 medium,重点题背,反复背。最简单会,大多不会。记住做题套路,以记住为主。
3. 第三遍:做题。做 easy 题;做部分 medium 题,hard 题有思路。夯实 medium 基础。熟练运用做题套路,以做题为主。
4. 面经:做面经,开阔思路,了解出题形式。基础决定上层建筑,基础牢轻松,不牢就痛苦 5,第四遍以上:刷题。
### Head first understand the solution
#### Read and doing notes in comment
1. List the data structure used.
2. Write sample data structure in test case.
3. Be the simulator to run the default test case.
4. Rewrite answer when you see necessary.
#### Rewrite
1. When you see the code don't follow [Single Responsibility Principle](https://en.wikipedia.org/wiki/Single_responsibility_principle).
2. When you see there is [better data structure](https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s06.html).
The rewrite should don't significantly reduce the performance(make the runtime drop to below 50%) but it is acceptable and normal to increase memory usage.
## Habit orientated
1. Everyday solve 3 question.
2. Limit every question time usage in 30 minutes.
## Ref
### Why we are doing 刷题
https://selfboot.cn/2016/07/24/leetcode_guide_why/
### Javascript Ans
https://github.com/hanzichi/leetcode
### Classification
https://cspiration.com/leetcodeClassification#103
### Tool
https://github.com/jdneo/vscode-leetcode
Far more better then online editor.Highly recommended if you use vs-code before
### Animation
https://github.com/MisterBooo/LeetCodeAnimation
# Ref Book
剑指 offer,
编程珠玑,
编程之美
大话数据结构
算法