A structured collection of my LeetCode solutions and DSA practice in Python. Focused on problem-solving, algorithmic thinking, and mastering common coding patterns.
This repository documents my journey of learning and practicing:
- Data Structures
- Algorithms
- Problem-Solving
- Time & Space Complexity
- Common DSA Patterns
- Technical Interview Questions
Problems are organized by topic and difficulty to make learning, revision, and progress tracking easier.
| Topic | Easy | Medium | Hard | Total |
|---|---|---|---|---|
| Arrays | 0 | 0 | 0 | 0 |
| Strings | 0 | 0 | 0 | 0 |
| Hash Table | 0 | 0 | 0 | 0 |
| Two Pointers | 0 | 0 | 0 | 0 |
| Sliding Window | 0 | 0 | 0 | 0 |
| Stack | 0 | 0 | 0 | 0 |
| Binary Search | 0 | 0 | 0 | 0 |
| Linked List | 0 | 0 | 0 | 0 |
| Trees | 0 | 0 | 0 | 0 |
| Heap | 0 | 0 | 0 | 0 |
| Graphs | 0 | 0 | 0 | 0 |
| Backtracking | 0 | 0 | 0 | 0 |
| Greedy | 0 | 0 | 0 | 0 |
| Dynamic Programming | 0 | 0 | 0 | 0 |
| Total | 0 | 0 | 0 | 0 |
Progress will be updated as new problems are solved.
leetcode-solutions/
β
βββ README.md
βββ .gitignore
β
βββ arrays/
β βββ easy/
β βββ medium/
β βββ hard/
β
βββ strings/
β βββ easy/
β βββ medium/
β βββ hard/
β
βββ hash-table/
β βββ easy/
β βββ medium/
β βββ hard/
β
βββ two-pointers/
β βββ easy/
β βββ medium/
β βββ hard/
β
βββ sliding-window/
β βββ easy/
β βββ medium/
β βββ hard/
β
βββ stack/
β βββ easy/
β βββ medium/
β βββ hard/
β
βββ binary-search/
β βββ easy/
β βββ medium/
β βββ hard/
β
βββ linked-list/
βββ trees/
βββ heap/
βββ graphs/
βββ backtracking/
βββ greedy/
βββ dynamic-programming/
β
βββ patterns/
β βββ two-sum.md
β βββ two-pointers.md
β βββ sliding-window.md
β βββ binary-search.md
β βββ bfs.md
β βββ dfs.md
β βββ backtracking.md
β βββ greedy.md
β βββ dynamic-programming.md
β
βββ notes/
β βββ complexity.md
β βββ data-structures.md
β βββ python-dsa.md
β
βββ templates/
βββ binary-search.py
βββ bfs.py
βββ dfs.py
βββ linked-list.py
βββ tree.py
βββ backtracking.py
Each problem follows a consistent structure:
0001-two-sum/
βββ solution.py
βββ README.md
Contains the final Python solution submitted to LeetCode.
Contains:
- Problem statement
- Difficulty
- Topics
- Approach
- Algorithm
- Complexity analysis
- Key learning
- Important edge cases
- Big O Notation
- Time Complexity
- Space Complexity
- Recursion
- Iteration
- Arrays
- Strings
- Hash Tables
- Stacks
- Queues
- Linked Lists
- Trees
- Heaps
- Graphs
- Two Pointers
- Sliding Window
- Fast & Slow Pointers
- Binary Search
- Prefix Sum
- Stack / Monotonic Stack
- Breadth-First Search
- Depth-First Search
- Backtracking
- Greedy
- Dynamic Programming
- Build strong DSA fundamentals
- Solve problems consistently
- Understand patterns instead of memorizing solutions
- Improve time and space complexity analysis
- Solve medium-level problems confidently
- Prepare for technical interviews
- Build a strong problem-solving foundation
Don't memorize the solution. Understand the pattern.
For every problem, I aim to understand:
Problem
β
Brute Force
β
Identify Pattern
β
Optimize
β
Code
β
Analyze Complexity
β
Review & Revisit
The goal is not simply to increase the number of solved problems, but to understand why a solution works and when a particular approach should be used.
| Pattern | Typical Use Cases |
|---|---|
| Two Pointers | Sorted arrays, pairs, strings |
| Sliding Window | Subarrays, substrings, contiguous ranges |
| Hash Table | Fast lookup, frequency counting |
| Binary Search | Sorted/search-space problems |
| Fast & Slow Pointers | Linked lists, cycle detection |
| Stack | Matching pairs, monotonic problems |
| BFS | Shortest path, level-order traversal |
| DFS | Traversal, connectivity |
| Backtracking | Permutations, combinations, subsets |
| Greedy | Local optimal decisions |
| Dynamic Programming | Overlapping subproblems |
Before submitting a solution, I try to ask:
- What is the brute-force approach?
- Can the time complexity be improved?
- Can extra space be reduced?
- What pattern does this problem use?
- What are the edge cases?
- Why does the algorithm work?
- What is the time complexity?
- What is the space complexity?
Solved problems should not be considered permanently completed.
Solve
β
Understand
β
Document
β
Revisit
β
Solve Again Without Looking
β
Improve
Problems that are difficult or repeatedly forgotten should be revisited regularly.
| Milestone | Status |
|---|---|
| 10 Problems | β¬ |
| 25 Problems | β¬ |
| 50 Problems | β¬ |
| 100 Problems | β¬ |
| 150 Problems | β¬ |
| 200 Problems | β¬ |
| 300 Problems | β¬ |
| 500 Problems | β¬ |
Primary Language: Python
Current Focus:
- DSA fundamentals
- Arrays & Strings
- Hash Tables
- Two Pointers
- Sliding Window
- Binary Search
This section will evolve as my DSA knowledge improves.
This repository is intended for learning, practice, and revision.
The solutions represent my understanding of the problems at the time they were solved. Some problems may have multiple valid approaches, and a solution here may not necessarily be the most optimal solution possible.
Aziz
Student | Python | Data Structures & Algorithms | Problem Solving
β If this repository helps you, consider giving it a star.
Keep solving. Keep learning. Keep improving.