An organized, growing collection of my LeetCode solutions in Python. Each problem is committed under its difficulty — easy/, medium/, or hard/ — using a consistent, link-friendly naming scheme.
The focus is on clean, readable, efficient solutions and on building durable problem-solving patterns across data structures and algorithms.
| Difficulty | Solved |
|---|---|
| 🟢 Easy | 8 |
| 🟡 Medium | 0 |
| 🔴 Hard | 0 |
| Total | 8 |
| # | Problem | Solution |
|---|---|---|
| 1 | Two Sum | Python |
| 9 | Palindrome Number | Python |
| 13 | Roman To Integer | Python |
| 14 | Longest Common Prefix | Python |
| 20 | Valid Parentheses | Python |
| 21 | Merge Two Sorted Lists | Python |
| 26 | Remove Duplicates From Sorted Array | Python |
| 27 | Remove Element | Python |
No solutions yet.
No solutions yet.
Click to expand the full solution tree
leetcode-solutions/
├── easy/
│ ├── 0001_two_sum.py
│ ├── 0009_palindrome_number.py
│ ├── 0013_roman_to_integer.py
│ ├── 0014_longest_common_prefix.py
│ ├── 0020_valid_parentheses.py
│ ├── 0021_merge_two_sorted_lists.py
│ ├── 0026_remove_duplicates_from_sorted_array.py
│ └── 0027_remove_element.py
├── medium/
├── hard/
└── README.md
Solutions follow a strict, link-friendly pattern so the automation can build correct LeetCode links:
<number>_<leetcode-slug-with-underscores>.py
| Filename | Problem | Generated link |
|---|---|---|
easy/0001_two_sum.py |
#1 Two Sum | leetcode.com/problems/two-sum/ |
medium/0146_lru_cache.py |
#146 LRU Cache | leetcode.com/problems/lru-cache/ |
Rules:
- Pad the number to 4 digits (
0001,0042,1342). - Use the exact LeetCode slug, with its hyphens written as underscores (
two-sum→two_sum). The script converts them back to build the URL. - One file per problem.
Arrays · Strings · Hash Maps · Two Pointers · Sliding Window · Linked Lists · Stacks · Queues · Trees · Binary Search · Recursion · Backtracking · Dynamic Programming · Graphs · Greedy · Heaps
The progress table, solutions index, and directory tree are generated automatically. A GitHub Action runs scripts/update_readme.py on every push, keeping each section in sync with the solutions committed to this repository.
- Build deep fluency in data structures and algorithms
- Write clean, efficient, idiomatic Python
- Develop reliable pattern recognition for coding interviews
- Maintain consistency — solve, document, repeat