Skip to content

Data Structures ​

Part of the Interview Prep Roadmap. Coverage ratings are explained there.

Work through alongside this section

  • NeetCode 150 — the single best-known curated list for coding interviews; its array, string, linked list, stack, tree, heap, and graph sections map onto the topics below. Worth finishing as a whole rather than cherry-picking.
  • Blind 75 — the shorter list NeetCode 150 grew out of, if time is tight.

Arrays & Strings ​

Indexing, traversal, and in-place manipulation, building up to two-pointer and sliding-window techniques.

Coverage: rich

Resources · NeetCode — Arrays & Hashing · NeetCode — Two Pointers / Sliding Window

Array Fundamentals ​

  • Indexing and memory layout
  • Fixed-size vs. dynamic arrays
  • Complexity of access, insertion, and deletion

Practice

Traversal & In-Place Manipulation ​

  • Iteration patterns
  • Reversal and rotation
  • Insertion and deletion within a fixed array

Practice

String Fundamentals ​

  • Character encoding and representation
  • Immutability and the cost of concatenation
  • Common string operations

Practice

Two-Pointer Technique ​

  • Opposite-end pointers
  • Fast and slow pointers
  • Pair and triplet problems

Practice

Sliding Window ​

  • Fixed-size windows
  • Variable-size windows
  • Substring and subarray problems

Practice

Prefix Sums ​

  • Prefix sum arrays
  • Range sum queries
  • Difference arrays

Practice

Multidimensional Arrays ​

  • 2D array traversal
  • Matrix rotation and transposition
  • Grid-based problems

Practice

Linked Lists ​

Node structure, traversal, and basic insert/delete operations, then reversal, cycle detection, and building tree-like structures out of nodes.

Coverage: moderate

Resources · NeetCode — Linked List

Linked List Fundamentals ​

  • Node structure and pointers
  • Singly, doubly, and circular linked lists
  • Comparison with arrays

Practice

Core Operations ​

  • Traversal
  • Insertion at head, tail, and middle
  • Deletion
  • Search

Practice

Pointer Techniques ​

  • Iterative and recursive reversal
  • Fast and slow pointers
  • Cycle detection
  • Finding the middle node
  • Nth node from the end

Practice

Multi-List Problems ​

  • Merging sorted lists
  • Intersection of two lists
  • Partitioning

Practice

Stacks & Queues ​

What LIFO and FIFO mean, and the problems each is the right tool for — browser history, CPU scheduling, expression evaluation.

Coverage: moderate

Resources · NeetCode — Stack

Stack Fundamentals ​

  • LIFO ordering
  • Push, pop, and peek
  • Array-based vs. linked-list-based implementation

Practice

Stack Applications ​

  • Expression notation (infix, prefix, postfix) and evaluation
  • Balanced parentheses
  • Undo history and browser navigation
  • The function call stack

Practice

Queue Fundamentals ​

  • FIFO ordering
  • Enqueue and dequeue
  • Circular queues
  • Array-based vs. linked-list-based implementation

Practice

Queue Variants & Applications ​

  • Deque
  • Priority queue
  • CPU scheduling and buffering
  • Monotonic stack and queue

Practice

Trees & Binary Search Trees ​

Tree terminology and traversal order, binary search tree operations, tree properties (full/complete), and heaps as priority queues.

Coverage: rich

Resources · NeetCode — Trees & Heap/Priority Queue · VisuAlgo — tree visualisations

Tree Fundamentals ​

  • Terminology: root, node, leaf, height, depth, degree
  • Binary vs. n-ary trees
  • Tree properties: full, complete, perfect, balanced
  • Array and linked representations

Practice

Tree Traversal ​

  • Inorder, preorder, and postorder
  • Level-order traversal
  • Recursive vs. iterative traversal

Practice

Binary Search Trees ​

  • BST ordering property
  • Search, insertion, and deletion
  • Degenerate trees and worst-case complexity
  • Inorder successor and predecessor
  • Lowest common ancestor

Practice

Balanced Trees ​

  • Purpose of balancing
  • Rotations
  • AVL trees
  • Red-black trees

Practice

Heaps & Priority Queues ​

  • Min-heap and max-heap properties
  • Array representation of a heap
  • Heapify, insertion, and extraction
  • Priority queue applications

Practice

Specialized Trees ​

  • Trie (prefix tree)
  • Segment tree
  • Binary indexed tree (Fenwick tree)

Practice

Graphs ​

Representation (adjacency list vs. matrix) and structural properties like bipartiteness. Traversal and shortest-path algorithms live under Graph Algorithms below.

Coverage: moderate

Resources · NeetCode — Graphs · VisuAlgo — graph structures

Graph Fundamentals ​

  • Vertices and edges
  • Directed vs. undirected graphs
  • Weighted vs. unweighted graphs
  • Degree, path, and cycle

Practice

Graph Representation ​

  • Adjacency matrix
  • Adjacency list
  • Edge list
  • Space and time trade-offs between representations

Practice

Graph Properties ​

  • Connectivity and connected components
  • Trees as a special case of graphs
  • Bipartite graphs
  • Dense vs. sparse graphs
  • Directed acyclic graphs

Practice

Hashing (Hash Tables & Maps) ​

How hashing works (hash functions, collisions), hash tables and hash maps, and when to reach for one over a tree or array.

Coverage: thin

Resources · NeetCode — Arrays & Hashing

Hashing Fundamentals ​

  • Hash functions and their properties
  • Hash tables, hash maps, and hash sets
  • Average vs. worst-case complexity

Practice

Collision Handling ​

  • Separate chaining
  • Open addressing (linear probing, quadratic probing, double hashing)
  • Load factor and rehashing

Practice

Applications ​

  • Frequency counting
  • Deduplication and membership testing
  • Caching and lookup tables
  • Choosing a hash map over a tree or array

Practice