DSA Notes

Queue

An introduction to the queue’s definition and first-in-first-out operations.

Stack

An introduction to the stack’s definition and last-in-first-out operations.

Prefix Sum and Difference Array

An introduction to prefix sums and difference arrays.

Sliding Window

An introduction to the sliding window technique — fixed-size and variable-size windows — with worked LeetCode solutions covering maximum average subarray, minimum subarray sum, threshold counting, and the longest subarray after flips.

Two Pointers

An introduction to the two-pointer technique — left/right pointers, fast/slow pointers, and parallel pointers — with worked LeetCode solutions covering sorted-array search, cycle detection, and merging sorted linked lists.

Linked List

A close look at the linked list — node structure, traversal, insertion, deletion, and query for the singly, doubly, and circular variants, plus dummy nodes and reversing a list.

Array

A close look at the array from the memory-layout level — the address formula, random access, the four basic operations, row-major vs column-major storage, dynamic arrays, and in-place operations.

Complexity Analysis

An introduction to time and space complexity — the notation, the common growth rates, and how to roughly judge the complexity of a piece of code.