Skip to content

chungchi300/headfirst-js-for-leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.
  2. When you see there is better data structure.

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, 编程珠玑, 编程之美 大话数据结构 算法

Releases

No releases published

Packages

No packages published