DSA Mastery Notes (Free Resources + 14 Patterns)

Master the Top 14 DSA patterns that appear in most coding interviews. Learn once, apply everywhere, and solve 80–90% of DSA problems with confidence.

· 1 page
Page 1 of 1DSA

DSA Mastery Notes

(Free Resources + 14 Patterns)


Best Free Resources to Learn DSA

1. YouTube Channels


2. Free Platforms for Practice


3. Free DSA Roadmaps


14 Core DSA Patterns to Master

Placement-Oriented

Learning DSA by patterns helps you quickly recognize question types and apply the right approach during interviews.

  1. Sliding Window
    Used for subarrays/substrings — max sum subarray, longest substring without repeating characters.

  2. Two Pointers
    Used for sorted arrays or linked lists — pair sum, remove duplicates.

  3. Fast & Slow Pointers
    Detect cycles, find middle of a linked list.

  4. Merge Intervals
    For overlapping ranges — meeting rooms, merging intervals.

  5. Cyclic Sort
    Finding missing/duplicate numbers in known ranges.

  6. In-place Reversal of Linked List
    Reverse a linked list or sublist without extra space.

  7. Tree BFS / DFS
    Level order, path sum, lowest common ancestor, etc.

  8. Graph BFS / DFS
    Grids, connected components, shortest path (unweighted).

  9. Topological Sort
    Task ordering in DAGs — course scheduling, dependencies.

  10. Binary Search
    Searching, boundaries, peaks, rotations, monotonic functions.

  11. Backtracking
    Combinations, permutations, subsets — N-Queens, Sudoku.

  12. Dynamic Programming (DP)
    Optimization problems — knapsack, LIS, coin change.

  13. Greedy Algorithms
    Optimal local choices — activity selection, Huffman coding.

  14. Heap / Priority Queue
    Kth largest/smallest, top K elements, merge sorted arrays.


Recommended Learning Order

  • Arrays & Strings
    (Sliding Window, Two Pointers)
  • Linked Lists
    (Reversal, Fast/Slow Pointers)
  • Stacks & Queues
    (Next Greater Element, Balanced Parentheses)
  • Trees & Graphs
    (DFS, BFS, Topological Sort)
  • Binary Search + Recursion
  • Backtracking
  • Dynamic Programming
  • Heaps & HashMaps
  • Greedy Algorithms

Placement Tip

“DSA isn’t about memorizing questions — it’s about recognizing patterns.”

  • ✅ Focus on 1–2 patterns per week
  • ✅ Practice 3–5 questions per pattern
  • ✅ Revisit mistakes regularly

Related Resources