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
- 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
- Arrays & Strings
- Linked Lists
- Stacks & Queues
- Recursion & Backtracking
- Trees & Binary Search Trees
- Heaps & Priority Queues
- Graphs & Traversals
- Sorting & Searching
- Dynamic Programming
- 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
- Patterns: opposing pointers, fast & slow pointers, in-place reversal
- Key Problems: Valid Palindrome, Container With Most Water, 3Sum
- Patterns: stack for state tracking, monotonic stack
- Key Problems: Valid Parentheses, Min Stack, Daily Temperatures, Largest Rectangle in Histogram
- Patterns: fixed window, dynamic window, longest/smallest substring patterns
- Key Problems: Best Time to Buy/Sell Stock, Longest Substring Without Repeating, Minimum Window Substring
- 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
- Patterns: fast/slow cycle detection, reversal, merge lists
- Key Problems: Reverse Linked List, Merge Two Sorted Lists, Reorder List, Detect Cycle
- 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
- Patterns: prefix tree, word search, autocomplete
- Key Problems: Implement Trie, Word Search II
- Patterns: min-heap & max-heap, k largest/smallest, priority scheduling
- Key Problems: Kth Largest Element, Merge K Sorted Lists, Task Scheduler
- Patterns: sort by start time, merge/insert intervals
- Key Problems: Merge Intervals, Non-overlapping Intervals, Meeting Rooms II
- Patterns: choose locally optimal to reach global benefit
- Key Problems: Jump Game, Gas Station, Partition Labels
- Patterns: permutations/combinations, subsets, N-Queens, decision-tree exploration
- Key Problems: Subsets, Combination Sum, Permutations, N-Queens
- Patterns: BFS shortest path, DFS visited tracking, cycle detection, adjacency list/matrix
- Key Problems: Number of Islands, Clone Graph, Course Schedule, Rotting Oranges
- Patterns: Dijkstra, Bellman-Ford, Floyd-Warshall, Union-Find
- Key Problems: Dijkstra implementation, Minimum Spanning Tree (Kruskal/Prim), Network Delay Time
- Patterns: DP on sequences, prefix/state transitions
- Key Problems: Fibonacci (memo/tabulation), Climbing Stairs, House Robber, Coin Change
- Patterns: DP on grid, DP on strings
- Key Problems: Longest Common Subsequence, Edit Distance, Unique Paths, 0/1 Knapsack
- Patterns: XOR tricks, setting/clearing/flipping bits
- Key Problems: Single Number, Counting Bits, Reverse Bits
- Patterns: GCD/LCM, prime factorization, geometry basics
- Key Problems: Happy Number, Rotate Image, Spiral Matrix
notes/: concise explanations and cheat-sheetsimplementations/: reference implementations per topicproblems/: solved problems grouped by source/platform
- Finish drafting notes for arrays and linked lists
- Add first batch of practice problems
- Set up automated tests to verify implementations
Suggestions and learning resources are always welcome!