Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 

Repository files navigation

🧠 LeetCode & DSA Journey

A structured collection of my LeetCode solutions and DSA practice in Python. Focused on problem-solving, algorithmic thinking, and mastering common coding patterns.


πŸ“Œ About This Repository

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.


πŸ› οΈ Language

Python


πŸ“Š Progress

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.


πŸ“‚ Repository Structure

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

🧩 Problem Format

Each problem follows a consistent structure:

0001-two-sum/
β”œβ”€β”€ solution.py
└── README.md

solution.py

Contains the final Python solution submitted to LeetCode.

README.md

Contains:

  • Problem statement
  • Difficulty
  • Topics
  • Approach
  • Algorithm
  • Complexity analysis
  • Key learning
  • Important edge cases

πŸ“š DSA Roadmap

1. Fundamentals

  • Big O Notation
  • Time Complexity
  • Space Complexity
  • Recursion
  • Iteration

2. Data Structures

  • Arrays
  • Strings
  • Hash Tables
  • Stacks
  • Queues
  • Linked Lists
  • Trees
  • Heaps
  • Graphs

3. Problem-Solving Patterns

  • Two Pointers
  • Sliding Window
  • Fast & Slow Pointers
  • Binary Search
  • Prefix Sum
  • Stack / Monotonic Stack
  • Breadth-First Search
  • Depth-First Search
  • Backtracking
  • Greedy
  • Dynamic Programming

🎯 Goals

  • 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

πŸ“ˆ Learning Philosophy

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.


πŸ”₯ Important Patterns

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

πŸ’‘ Problem-Solving Checklist

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?

πŸ” Revision Strategy

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.


πŸ† Milestones

Milestone Status
10 Problems ⬜
25 Problems ⬜
50 Problems ⬜
100 Problems ⬜
150 Problems ⬜
200 Problems ⬜
300 Problems ⬜
500 Problems ⬜

🌱 Current Focus

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.


πŸ“– Useful Resources


⚠️ Disclaimer

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.


πŸ‘¨β€πŸ’» Author

Aziz

Student | Python | Data Structures & Algorithms | Problem Solving


⭐ If this repository helps you, consider giving it a star.

Keep solving. Keep learning. Keep improving.

About

A collection of my LeetCode solutions and DSA practice in Python. Focused on problem-solving, algorithmic thinking, and coding patterns.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors