Data Structures

Solutions organized by core data structures including stacks, queues, heaps, trees, and more

Collection of LeetCode solutions categorized by fundamental data structures:

  • Stack
  • Queue / Deque
  • Heap
  • Binary Tree
  • Linked List
  • Binary Search Tree (set / multiset) / (map / multimap)
  • Bitset

Stack

Solutions that utilize stack data structure

Queue / Deque

Solutions that utilize queue and double-ended queue data structures

Heap

Solutions that utilize heap data structure

Binary Tree

Solutions that utilize binary tree data structure

Linked List

Solutions that utilize linked list data structure

Binary Search Tree

Solutions that utilize binary search tree data structures (set/multiset, map/multimap)

Bitset

Solutions that utilize bitset data structure