Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Complete-DSA

About This Repo

I'm currently learning Data Structures and Algorithms (DSA) and using this repository to keep my notes, practice problems, and reference implementations in one place. The main goals are:

  • Strengthen core computer science fundamentals
  • Build intuition for time/space complexity trade-offs
  • Practice writing clean, well-documented code solutions

How I Study

  • Start with the theory behind each data structure or algorithm
  • Write down the core operations, constraints, and complexity
  • Implement the concept from scratch in my preferred language
  • Solve a curated set of problems to reinforce the idea

Topics Checklist

  • Arrays & Strings
  • Linked Lists
  • Stacks & Queues
  • Recursion & Backtracking
  • Trees & Binary Search Trees
  • Heaps & Priority Queues
  • Graphs & Traversals
  • Sorting & Searching
  • Dynamic Programming

End-to-End Study Roadmap

1. Arrays & Hashing (Start Here)

  • Concepts: static vs dynamic arrays, HashMap/HashSet basics, frequency counting, prefix sums
  • Key Problems: Two Sum, Group Anagrams, Product of Array Except Self, Top K Frequent Elements

2. Two Pointers (prerequisite: Arrays)

  • Patterns: opposing pointers, fast & slow pointers, in-place reversal
  • Key Problems: Valid Palindrome, Container With Most Water, 3Sum

3. Stack

  • Patterns: stack for state tracking, monotonic stack
  • Key Problems: Valid Parentheses, Min Stack, Daily Temperatures, Largest Rectangle in Histogram

4. Sliding Window

  • Patterns: fixed window, dynamic window, longest/smallest substring patterns
  • Key Problems: Best Time to Buy/Sell Stock, Longest Substring Without Repeating, Minimum Window Substring

5. Binary Search

  • Patterns: search on sorted array, search on answer (parametric search)
  • Key Problems: Binary Search, First/Last Position in Sorted Array, Koko Eating Bananas, Median of Two Sorted Arrays

6. Linked List

  • Patterns: fast/slow cycle detection, reversal, merge lists
  • Key Problems: Reverse Linked List, Merge Two Sorted Lists, Reorder List, Detect Cycle

7. Trees (prerequisite: Recursion)

  • Patterns: DFS (pre/in/post-order), BFS level traversal, height/diameter, balanced tree checks
  • Key Problems: Maximum Depth, Diameter of Binary Tree, Binary Tree Level Order, Validate BST

8. Tries

  • Patterns: prefix tree, word search, autocomplete
  • Key Problems: Implement Trie, Word Search II

9. Heap / Priority Queue

  • Patterns: min-heap & max-heap, k largest/smallest, priority scheduling
  • Key Problems: Kth Largest Element, Merge K Sorted Lists, Task Scheduler

10. Intervals

  • Patterns: sort by start time, merge/insert intervals
  • Key Problems: Merge Intervals, Non-overlapping Intervals, Meeting Rooms II

11. Greedy

  • Patterns: choose locally optimal to reach global benefit
  • Key Problems: Jump Game, Gas Station, Partition Labels

12. Backtracking (prerequisite: Recursion)

  • Patterns: permutations/combinations, subsets, N-Queens, decision-tree exploration
  • Key Problems: Subsets, Combination Sum, Permutations, N-Queens

13. Graphs (prerequisite: Trees + BFS/DFS)

  • Patterns: BFS shortest path, DFS visited tracking, cycle detection, adjacency list/matrix
  • Key Problems: Number of Islands, Clone Graph, Course Schedule, Rotting Oranges

14. Advanced Graphs

  • Patterns: Dijkstra, Bellman-Ford, Floyd-Warshall, Union-Find
  • Key Problems: Dijkstra implementation, Minimum Spanning Tree (Kruskal/Prim), Network Delay Time

15. 1-D Dynamic Programming

  • Patterns: DP on sequences, prefix/state transitions
  • Key Problems: Fibonacci (memo/tabulation), Climbing Stairs, House Robber, Coin Change

16. 2-D Dynamic Programming

  • Patterns: DP on grid, DP on strings
  • Key Problems: Longest Common Subsequence, Edit Distance, Unique Paths, 0/1 Knapsack

17. Bit Manipulation

  • Patterns: XOR tricks, setting/clearing/flipping bits
  • Key Problems: Single Number, Counting Bits, Reverse Bits

18. Math & Geometry

  • Patterns: GCD/LCM, prime factorization, geometry basics
  • Key Problems: Happy Number, Rotate Image, Spiral Matrix

Folder Layout (planned)

  • notes/: concise explanations and cheat-sheets
  • implementations/: reference implementations per topic
  • problems/: solved problems grouped by source/platform

Next Steps

  1. Finish drafting notes for arrays and linked lists
  2. Add first batch of practice problems
  3. Set up automated tests to verify implementations

Suggestions and learning resources are always welcome!

About

Learning about DSA

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages