Skip to content

About

A structured Data Structures and Algorithms (DSA) repository featuring topic-wise documentation, algorithmic patterns, LeetCode solutions in Python, complexity analysis, optimized approaches, and technical interview preparation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

DSA in Python banner

Python LeetCode Focus Topics License


Overview

A topic-wise repository for learning Data Structures and Algorithms through clear notes, reusable patterns, and clean Python solutions to LeetCode problems. The goal is strong algorithmic thinking, independent problem solving, and a reusable reference for software engineering interviews.

Key Features

  • Clear explanations of DSA concepts
  • Reusable algorithmic patterns and code templates
  • LeetCode solutions in Python with brute-force and optimized approaches
  • Step-by-step dry runs, edge cases, and common mistakes
  • Time and space complexity for every solution
  • Per-topic progress trackers, weekly reviews, and revision notes
  • Solutions that run and self-check automatically through GitHub Actions

Table of Contents


Current Focus

Topic Binary Search
Period November 2026
Status In Progress
Next up Two Pointers

*View Binary Search notes and solutions →


Roadmap and Progress

Tick a topic only after understanding the concept, solving related problems, and implementing the key patterns independently. Link each topic to its folder once it exists.

1. Foundations
  • Programming Fundamentals
  • Python Fundamentals for DSA
  • Time and Space Complexity
  • Big O Notation and Asymptotic Analysis
  • Recursion Fundamentals
  • Mathematics for DSA
2. Data Structures
  • Arrays
  • Strings
  • Linked Lists (Singly and Doubly)
  • Stacks
  • Queues and Circular Queues
  • Hash Tables and Hash Maps
  • Sets
  • Trees and Binary Trees
  • Binary Search Trees
  • Heaps and Priority Queues
  • Tries
  • Graphs
3. Searching and Sorting
  • Linear Search
  • Binary Search
  • Binary Search on Answer
  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Counting Sort
  • Heap Sort
4. Problem-Solving Patterns
  • Two Pointers
  • Sliding Window
  • Fast and Slow Pointers
  • Prefix Sum
  • Difference Array
  • Hashing
  • Monotonic Stack and Queue
  • Intervals
  • Cyclic Sort
  • Divide and Conquer
5. Algorithmic Techniques
  • Greedy Algorithms
  • Backtracking
  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • Topological Sorting
  • Shortest Path Algorithms
  • Minimum Spanning Tree
  • Dynamic Programming
  • Bit Manipulation
  • Disjoint Set Union (DSU)
6. Advanced Topics
  • Advanced Dynamic Programming
  • Segment Trees
  • Fenwick Trees (Binary Indexed Trees)
  • Strongly Connected Components
  • Network Flow Fundamentals
  • String Matching Algorithms
7. Interview Preparation (practice tracks)
  • Arrays and Strings
  • Searching and Sorting
  • Linked Lists
  • Stacks and Queues
  • Trees and BSTs
  • Graphs
  • Dynamic Programming
  • Mixed Problem Sets
  • Timed Coding Practice
  • Mock Technical Interviews

Learning Methodology

flowchart LR
    A[Learn] --> B[Understand]
    B --> C[Identify Pattern]
    C --> D[Practice]
    D --> E[Optimize]
    E --> F[Revise]
    F --> G[Master]
    F -.->|weak spot| D
Loading

A problem counts as mastered when I can:

  • Explain it in my own words
  • Identify the right algorithmic pattern
  • Build a solution independently and explain why it works
  • Write the Python code without copying
  • Analyze time and space complexity
  • Handle edge cases and solve related variations
  • Explain the solution in an interview

Solution Format

Every problem follows the same structure
Section What it covers
Problem Information Title, number, difficulty, link
Problem Statement Restatement, constraints, examples
Understanding Observations and key insights
Pattern The DSA pattern and why it fits
Brute Force Initial approach and its limits
Optimized Approach Improved solution and intuition
Python Solution Clean, commented implementation
Dry Run Step-by-step execution on an example
Complexity Time and space
Edge Cases Important test cases
Common Mistakes Pitfalls to avoid
Follow-ups Variations and related questions
Key Takeaways Lessons learned

Repository Structure

.
├── README.md
├── LICENSE
├── .gitignore
├── .github/workflows/ci.yml        # Runs every solution as a self-check
├── templates/
│   ├── PROBLEM_TEMPLATE.md
│   └── TOPIC_README_TEMPLATE.md
├── Binary-Search/
│   ├── README.md                   # Notes, patterns, tracker, problem table
│   ├── 704_binary_search.py
│   └── 35_search_insert_position.py
└── Two-Pointers/                   # Next topic

Each topic folder has its own README with concept notes, a problems table, a progress tracker, and a weekly review.


Running the Solutions

Every solution file contains its own test cases, so there is nothing to install.

python Binary-Search/704_binary_search.py

No output means all checks passed. GitHub Actions runs every file on each push.


LeetCode Stats

Tech Stack

Technology Purpose
Python 3 Primary language
LeetCode Coding practice
Git and GitHub Version control and hosting
GitHub Actions Automatic solution checks
Markdown Technical documentation

Learning Resources

LeetCode · GeeksforGeeks · Programiz · VisuAlgo · CP-Algorithms · Python Docs


Repository Philosophy

This repository exists to build a strong foundation in problem solving through consistent practice and detailed documentation.

The focus is on understanding why an algorithm works, spotting reusable patterns, weighing optimizations, and being able to solve unfamiliar problems independently.

Learn. Analyze. Implement. Optimize.

footer wave

About

A structured Data Structures and Algorithms (DSA) repository featuring topic-wise documentation, algorithmic patterns, LeetCode solutions in Python, complexity analysis, optimized approaches, and technical interview preparation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages