Skip to content

amitmittal117/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Patterns & Solutions

Language  License 

A progression-based guide to mastering algorithm patterns through LeetCode solutions.


Pattern Progression

📚 View Full Learning Roadmap →

┌─────────────────────────────────────────────────────────────┐
│                    LEARNING PATH                            │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  TIER 1: Hash Map → Two Pointers → Binary Search            │
│                                                             │
│  TIER 2: Sliding Window → Stack → Monotonic Stack           │
│                                                             │
│  TIER 3: Tree DFS/BFS → Backtracking                        │
│                                                             │
│  TIER 4: Graph DFS/BFS → Topological Sort → Union-Find      │
│                                                             │
│  TIER 5: 1D DP → 2D DP → Grid DP → Interval DP              │
│                                                             │
│  TIER 6: Trie → Greedy → Heap → Bit Manipulation            │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Pattern Index

# Pattern Description Detailed Guide
1 Binary Search 🔍 Eliminate half each iteration Guide
2 Two Pointers 👆 Reduce O(n²) to O(n) Guide
3 Sliding Window 🪟 Incremental window updates Guide
4 Linked List 🔗 Pointer manipulation Guide
5 Monotonic Stack 📚 Next greater/smaller element Guide
6 Graph (DFS/BFS) 🌳 Tree/graph traversal Guide
7 Dynamic Programming 📊 Overlapping subproblems Guide
8 Backtracking 🔄 Explore all possibilities Guide
9 Union-Find 🔗 Disjoint set connectivity Guide
10 Trie 🌲 Prefix tree for strings Guide
11 Heap 🏔️ Priority queue / top-k Guide
12 Greedy 💡 Local optimal → global Guide
13 Bit Manipulation 🔢 Binary operations Guide

Quick Reference

Pattern Template Snippet
Binary Search while left <= right: mid = (left+right)//2
Two Pointers while left < right: # compare and move
Sliding Window for right: expand; while invalid: shrink
Linked List dummy = Node(0); dummy.next = head
Stack if open: push; if close: pop and match
DFS mark visited; for neighbors: recurse
DP dp[i] = f(dp[i-1], ...)
Backtracking choose; explore; unchoose

Progress: 166 / 3056 files ✅


Repository Structure

  • solutions/ - Comprehensive LeetCode solutions in Python.
  • patterns/ - Detailed algorithm pattern guides and mind maps.
  • PROGRESS.md - Tracked history of processed problems.

About

Solving Leetcode Solutions as I go. Each enhanced solution includes an INTUITION section explaining the technical "WHY" behind the logic.


Commands Reference

Command What it does
Continue Process next batch of files
Resume from progress tracker Pick up where we left off
Create mind map: [Name] Create new company/topic mind map
git push Upload progress to GitHub

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages