Skip to content

subham-hq/leetcode-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧩 LeetCode Solutions

Typing SVG
Python LeetCode Last commit Repo size



Skills

📖 About

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.


📊 LeetCode Stats


🎯 Progress

Difficulty Solved
🟢 Easy 8
🟡 Medium 0
🔴 Hard 0
Total 8

🧠 Solutions Index

🟢 Easy (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

🟡 Medium (0)

No solutions yet.

🔴 Hard (0)

No solutions yet.


🗂️ Repository Structure

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

🏷️ Naming Convention

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-sumtwo_sum). The script converts them back to build the URL.
  • One file per problem.

🧮 Topics Covered

Arrays · Strings · Hash Maps · Two Pointers · Sliding Window · Linked Lists · Stacks · Queues · Trees · Binary Search · Recursion · Backtracking · Dynamic Programming · Graphs · Greedy · Heaps


⚙️ Automation

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.


🚀 Goals

  • 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

About

A collection of my LeetCode solutions in Python, documenting my journey through data structures, algorithms, and problem-solving. Each solution focuses on writing clean, efficient, and well-structured code while improving technical interview skills.

Resources

License

Stars

5 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages