Last Minute Notes

DSA

The 14 coding interview patterns in JavaScript and Java, with templates, dry runs, variants, pitfalls, and a playbook for recognizing which pattern to use.

Start here for pattern-based DSA prep: sliding window, two pointers, intervals, linked lists, trees, heaps, subsets, binary search, and topological sort. Based on the dsa-patterns repository, expanded with reusable templates, worked dry runs, extra problem variants, and common bugs. Every pattern has runnable JavaScript and Java code, and every snippet was executed against test cases. The original repository also has Python versions. When you want problems to practice on, the LeetCode 30-Day Plan lists 150 problems grouped by pattern, with direct LeetCode links.

  1. 01
    Pattern Playbook

    How to recognize the right DSA pattern, an interview framework, complexity cheat sheets, extra patterns beyond the 14, JavaScript and Java gotchas, and a practice roadmap.

  2. 02
    Patterns: Arrays, Strings and Linked Lists

    Sliding window, two pointers, fast and slow pointers, merge intervals, cyclic sort, and in-place linked list reversal with templates, dry runs, variants, and Java implementations.

  3. 03
    Patterns: Trees, Heaps, Search and Graphs

    Tree BFS and DFS, two heaps, subsets and backtracking, modified binary search, top K, K-way merge, and topological sort with templates, dry runs, variants, and Java implementations.

  4. 04
    LeetCode 30-Day Plan

    A 30-day, five-problems-a-day LeetCode revision plan grouped by pattern, with direct problem links, difficulty tags, and pointers to the matching pattern notes.