From Zero to Leetcode Hero
Welcome to LeetCode Hero, a repository that documents my journey of mastering algorithms and data structures. This project serves as both a personal learning journal and a professional portfolio of my solutions, implemented in Modern C++ and Haskell.
- ⭐ Star this repository if you find it helpful!
- 🔄 Share with others learning functional programming
- 🤝 Contributions welcome - especially Haskell optimizations!
- Modern C++: Solutions in C++ are written to reflect clean, efficient, and production-ready code, mirroring my professional work as a compiler engineer.
- Haskell: Solutions in Haskell are an exploration of functional programming paradigms, used to tackle problems from a different perspective and for mental training.
Each problem is contained in its own directory, named with its LeetCode number and title for easy navigation (e.g., 001_Two_Sum
). Explanations are added for some solutions as I refine my understanding.
Feel free to check out my other projects on my GitHub Profile.
- Build and complete the
CultivationDB.yaml
database.
This is the task we discussed on Sept 6-7. Phase 1 (Diagnosis) revealed a clear "Debt List" of forgotten critical topics. This is your immediate homework.
-
Mission: Attack the L1_FORGOT List. Treat these 10 problems as "new" and re-learn them from scratch.
-
Goal: Convert all 10 of these from
L1
to at leastL2_STRUGGLE
by mid-September. -
The Debt List (The 7 "L1_FORGOT" entries from YAML):
-
211
(Design Add/Search Trie) - (Trie Data Structure) -
207
(Course Schedule I) - (Kahn's / Topological Sort) -
210
(Course Schedule II) - (Graph Cycle Check) -
152
(Max Product Subarray) -
155
(Min Stack) -
239
(Sliding Window Max) - (Monotonic Queue) -
416
(Partition Equal Subset Sum) - (Knapsack DP) -
230
(Kth Smallest Element in a BST) -
206
(Reverse Linked List)
-
-
The 2 Missing Problems (The "New Debt"):
-
004
(Median of Two Sorted Arrays) - (Hard Binary Search) -
556
(Next Greater Element III) -
918
Maximum Sum Circular Subarray (kadane's algorithm variant)
-
Mission: To systematically clear foundational weaknesses and the L2_STRUGGLE
list by merging deliberate practice with the mindfulness techniques defined in the "LeetCode 心法練習 SOP". The goal is not just to solve problems, but to achieve a state of calm, focused flow while doing so.
Topic Mastery Checklist:
- Theme: Linked List
- Complete all Neetcode 150 Linked List problems (2/13)
- Review all
L2_STRUGGLE
Linked List problems fromCultivationDB.yaml
- Theme: Trees (Basics & Traversal) (6/6)
- Theme: Trees (Advanced) (9/9)
- Theme: DP / Graphs / etc.
- Systematically work through other
L2_STRUGGLE
topics fromCultivationDB.yaml
- Systematically work through other
- Theme: System Design (Introduction)
- Watch/Read 2-3 introductory pieces of content on System Design per week (e.g., foundational concepts, classic problem overviews). (0/10)
Prerequisite: This phase begins when the L2_STRUGGLE
list feels manageable and you have built confidence in the core topics from Phase 3. The focus shifts from topic-by-topic learning to integrated, mock-interview-style practice.
Mission: To synthesize all required skills—algorithmic fluency, system design, and behavioral communication—into a cohesive, interview-ready whole.
The Three Pillars of Preparation:
-
Pillar 1: Algorithmic Fluency
- Conduct full-length (45 min) mock coding interviews (0/5)
- Review all
L3_MASTERED
problems to ensure instant recall (0/20) - Tackle a curated list of
Hard
problems to expand boundaries (0/5)
-
Pillar 2: System Design
- Study and summarize foundational System Design concepts (e.g., CAP Theorem, Caching, Load Balancing, Databases) (0/5)
- Practice explaining the architecture of classic problems aloud (e.g., Design Twitter, Design a URL Shortener, Design a Web Crawler) (0/5)
- Conduct full-length (45 min) mock System Design interviews (0/3)
-
Pillar 3: Behavioral & Communication
- Draft and refine 5-7 key project stories using the STAR method.
- Practice telling your stories aloud, focusing on clarity and impact.
- Prepare thoughtful questions to ask your interviewers.
- Review your "About Me" and professional narrative from your resume.