Leetcode Profile :- https://leetcode.com/u/harsh9265/
A curated collection of my solutions to LeetCode problems β with clean code, clear explanations, and learning notes.
Goal: Build strong problem-solving skills by organizing solutions by topic, tracking progress, and reflecting on patterns and trade-offs.
Edit these badges later (e.g., update counts, languages) by changing the numbers/text in the URLs.
Every solution includes:
- Approach & intuition (why this works, key idea, and patterns used)
- Time & space complexity
- Edge cases
- Code with comments
- Optional: alt approaches (e.g., brute force vs optimized)
I often use
py
on Windows (same as my local workflow).
- Arrays & Strings
- Hash Map / Hash Set
- Two Pointers
- Sliding Window
- Stack / Queue
- Binary Search
- Linked List
- Start with brute force, then optimize.
- Identify pattern early: sliding window, two pointers, prefix sums, etc.
- Write down complexity before coding.
- Add 2β3 sanity tests per solution.
- Reflect in the per-problem README: βWhat tripped me up?β
Current focus: sliding window, two pointers, hash map (my common interview set).
- Add C++/Java versions for popular problems
- Add benchmarking script for runtime comparisons
- Add explanations with visuals where helpful
- Automate problem scaffolding with a CLI (create folder + template)
- Add CI (run tests on push via GitHub Actions)
This is primarily my personal learning repo. Suggestions welcome via issues/PRs for:
- Cleaner solutions
- New test cases
- Alternative approaches
- LeetCode Discuss (patterns & templates)
- CP/Algo patterns: sliding window, two pointers, prefix sums
- Python tips:
collections
,heapq
,bisect
,itertools
This repository is licensed under the MIT License. See LICENSE
for details.