Skip to content

About

Daily LeetCode practice system: tested Python solutions + a CLI tracker for streaks, pattern gaps and what to practise next.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

Repository files navigation

LeetCode Grind

A daily LeetCode practice system: tested Python solutions + a CLI tracker that keeps the streak alive and tells you what to practise next.

Built around one rule: 2 problems a day, every day — while preparing for Summer 2027 software engineering internship interviews.


What this project does

  1. Stores clean, tested solutions — one Python module per problem in solutions/. Every module states the problem, the pattern it trains, the approach, and its time/space complexity. Every solution is covered by unit tests; a solution is not "done" until its test passes and it can be re-solved from a blank page.

  2. Tracks the grind with a CLI — grind.py logs solved problems to a local JSON file and answers three questions:

    • Am I still on streak? — current and longest streak of consecutive solving days
    • Where are the gaps? — breakdown by difficulty and by pattern
    • What do I do next? — suggests the least-practised pattern, and keeps a re-solve queue for problems flagged for spaced repetition
    • How am I doing overall? — grind.py export prints a Markdown summary (totals, streaks, breakdowns, review queue) to paste anywhere
  3. Shows the plan and the history — ROADMAP.md lists the 12 interview patterns in learning order with their status, and PROGRESS.md is a dated log of what landed each day.

Quick start

No dependencies. Python 3.10+.

git clone https://github.com/FullStraing/leetcode-grind.git
cd leetcode-grind

# log a solved problem
python grind.py add "Two Sum" easy hashmap --minutes 12
python grind.py add "Group Anagrams" medium hashmap --minutes 25 --review

# see where you stand
python grind.py stats
python grind.py next      # which pattern to practise next
python grind.py review    # problems flagged for re-solving
python grind.py review --done "Two Sum"  # mark a problem as reviewed
python grind.py export    # Markdown summary of the grind so far

# run all tests (tracker + every solution)
python -m unittest -v

Example output:

$ python grind.py stats
Total solved:    15
Current streak:  3 day(s)
Longest streak:  5 day(s)
By difficulty:   easy 10 · medium 5 · hard 0
By pattern:      binary-search 4, two-pointers 4, hashmap 3, ...
Next to practise: sliding-window

Solutions so far

# Problem Difficulty Pattern Approach in one line
1 Two Sum Easy HashMap One pass, look up target - num
3 Longest Substring Without Repeating Characters Medium Sliding Window Window expands right, jumps left past repeats
11 Container With Most Water Medium Two Pointers Move the pointer at the shorter line inward
20 Valid Parentheses Easy Stack Push openers, match closers off the top
35 Search Insert Position Easy Binary Search left ends at the insertion point
49 Group Anagrams Medium HashMap Bucket words by their sorted letters
69 Sqrt(x) Easy Binary Search Search the answer; keep the largest square ≤ x
71 Simplify Path Medium Stack Stack the real directories; .. pops
125 Valid Palindrome Easy Two Pointers Pointers from both ends, skip non-alphanumerics
150 Evaluate Reverse Polish Notation Medium Stack Operands on a stack; operators pop two, push one
155 Min Stack Easy Stack A second stack tracks the running minimum
167 Two Sum II Medium Two Pointers Sorted array: pointers from both ends
209 Minimum Size Subarray Sum Medium Sliding Window Expand right, shrink left while sum ≥ target
217 Contains Duplicate Easy HashMap One pass, remember what was seen
242 Valid Anagram Easy HashMap Count letters of one, spend on the other
278 First Bad Version Easy Binary Search Halve on the answer; bad means at-or-before
394 Decode String Medium Stack Two stacks: counts and the strings built so far
424 Longest Repeating Character Replacement Medium Sliding Window Keep the most frequent letter, replace the rest
704 Binary Search Easy Binary Search Halve the interval every step
735 Asteroid Collision Medium Stack Survivors stack; left-movers fight the top
739 Daily Temperatures Medium Stack Monotonic stack of indices waiting for warmth
844 Backspace String Compare Easy Stack Build each reduced string, then compare
1047 Remove All Adjacent Duplicates In String Easy Stack Equal neighbours cancel off the top

New solutions land daily — see PROGRESS.md.

Project structure

leetcode-grind/
├── README.md          ← you are here
├── grind.py           ← CLI tracker: streaks, stats, next pattern, review queue
├── test_grind.py      ← tests for the tracker
├── solutions/         ← one tested module per solved problem
│   ├── two_sum.py
│   ├── valid_anagram.py
│   ├── group_anagrams.py
│   ├── contains_duplicate.py
│   ├── longest_substring.py
│   ├── binary_search.py
│   ├── two_sum_ii.py
│   ├── valid_palindrome.py
│   ├── container_with_most_water.py
│   ├── minimum_size_subarray_sum.py
│   ├── search_insert_position.py
│   ├── first_bad_version.py
│   ├── sqrt_x.py
│   ├── valid_parentheses.py
│   ├── longest_repeating_character_replacement.py
│   ├── min_stack.py
│   ├── evaluate_rpn.py
│   ├── daily_temperatures.py
│   ├── asteroid_collision.py
│   ├── remove_adjacent_duplicates.py
│   ├── decode_string.py
│   ├── backspace_compare.py
│   └── simplify_path.py
├── test_solutions.py  ← tests for every solution
├── ROADMAP.md         ← the 12 patterns, in order, with status
└── PROGRESS.md        ← dated daily log — the streak, in writing

Why it exists

Interview prep usually dies from missed days, not from hard problems. This repo makes the streak visible, the gaps obvious, and the next step automatic — so the only daily decision left is sit down and solve.

License

MIT — see LICENSE.

About

Daily LeetCode practice system: tested Python solutions + a CLI tracker for streaks, pattern gaps and what to practise next.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages