Classical Data Structures#

Data Structure Title & Question Number Key Concept / Focus
Hash Table #146 LRU Cache Infra Essential: HashMaps + Doubly Linked Lists for O(1) access/eviction.
Hash Table #460 LFU Cache Advanced eviction policy; frequency-based tracking with nested HashMaps.
Array #1 Two Sum The foundation of frequency mapping and index lookups.
Array #238 Product of Array Except Self Prefix/suffix products without division; common in metric normalization.
String #3 Longest Substring Without Repeating Characters Mastering the Sliding Window pattern.
String #49 Group Anagrams Hashing and grouping; applicable to log deduplication and fingerprinting.
Linked List #206 Reverse Linked List Core pointer manipulation and iterative/recursive logic.
Linked List #23 Merge K Sorted Lists Heap-based merging; mirrors merging sorted log streams from multiple sources.
Stack #20 Valid Parentheses Linear parsing and LIFO (Last-In-First-Out) logic.
Stack #84 Largest Rectangle in Histogram Monotonic stack; useful for capacity planning and resource window analysis.
Queue #239 Sliding Window Maximum Monotonic Queue for optimized window processing.
Queue #933 Number of Recent Calls Rate limiting simulation; directly models request throttling logic.
Tree #102 Binary Tree Level Order Traversal The “Hello World” of Breadth-First Search (BFS).
Tree #236 Lowest Common Ancestor of a Binary Tree Recursive tree traversal; models namespace/path hierarchy resolution.
BST #98 Validate Binary Search Tree Understanding recursion boundaries and tree properties.
BST #230 Kth Smallest Element in a BST In-order traversal; useful for percentile queries on ordered metrics.
Heap #215 Kth Largest Element in an Array Efficiently managing “Top K” streaming data or task priority.
Heap #295 Find Median from Data Stream Dual-heap pattern; real-time percentile tracking (p50/p99 latency).
Graph #200 Number of Islands Matrix traversal using DFS/BFS; the most common graph prompt.
Graph #133 Clone Graph BFS/DFS with memoization; models deep-copying distributed config graphs.
Trie #208 Implement Trie (Prefix Tree) Efficient string prefix storage and autocomplete logic.
Trie #212 Word Search II Trie + DFS backtracking; models multi-pattern log/path matching.
Union-Find #547 Number of Provinces Infra Essential: Models network partition detection and cluster connectivity.
Union-Find #684 Redundant Connection Cycle detection in graphs; identifies redundant links in network topology.

Classical Algorithms#

Algorithm Category Title & Question Number Real-World Context (Infra/SRE)
Binary Search #33 Search in Rotated Sorted Array Searching through partitioned or sharded sorted data sets.
Binary Search #153 Find Minimum in Rotated Sorted Array Efficiently locating boundaries in rotated/partitioned data.
BFS (Graph) #127 Word Ladder Finding the shortest path in an unweighted state-space/network.
BFS (Graph) #994 Rotting Oranges Multi-source BFS; models failure/alert propagation across a network.
DFS (Graph) #207 Course Schedule Topological Sort: Resolving service or package dependencies.
DFS (Graph) #399 Evaluate Division Weighted graph traversal; models unit conversion chains and metric ratios.
Dijkstra #743 Network Delay Time Directly mirrors network packet routing and latency calculations.
Dijkstra #787 Cheapest Flights Within K Stops Constrained shortest path; models cost-aware routing with hop limits.
Two Pointers #15 3Sum Optimizing multi-variable searches from O(n³) to O(n²).
Two Pointers #11 Container With Most Water Greedy boundary shrinking; models capacity optimization problems.
Sliding Window #76 Minimum Window Substring Extracting specific patterns from high-velocity log streams.
Sliding Window #438 Find All Anagrams in a String Fixed-size window pattern matching; applicable to network signature detection.
Backtracking #46 Permutations Exhaustive state-space search (e.g., finding all possible config combinations).
Backtracking #79 Word Search DFS + backtracking on a grid; models path finding in topology graphs.
Greedy #435 Non-overlapping Intervals Infra Essential: Scheduling maintenance windows and minimizing overlapping deploys.
Greedy #55 Jump Game Local decision-making to reach a global destination efficiently.
DP (1D) #322 Coin Change Optimization problems like fitting tasks into fixed-size nodes.
DP (1D) #300 Longest Increasing Subsequence Modeling monotonically growing metrics; version ordering.
DP (2D) #1143 Longest Common Subsequence Underlying logic for diff tools and version control comparisons.
DP (2D) #72 Edit Distance Minimum edit operations; powers fuzzy log matching and config drift detection.
Bit Manipulation #191 Number of 1 Bits Low-level performance tuning and flag-based state management.
Bit Manipulation #136 Single Number XOR-based deduplication; detecting unique anomalies in paired datasets.