
Doubly Linked List Implementation: Two Pointers Are Better Than One
Learn doubly linked list implementation: sentinel nodes, O(1) deletion, and the hash map + DLL pattern behind LRU Cache and LFU Cache.
Page 18 of 61 · Ideas for curious minds in tech.
Back to the archive
Learn doubly linked list implementation: sentinel nodes, O(1) deletion, and the hash map + DLL pattern behind LRU Cache and LFU Cache.
Linked list data structure explained: nodes, pointers, time complexity, singly vs doubly, and three interview patterns you need to know cold.
How a dynamic array resizes under the hood, why append is O(1) amortized, and what Python lists, Java ArrayLists, and Go slices actually do differently.

The array data structure explained: O(1) indexing, dynamic resizing, cache locality, and why every two-pointer pattern depends on index arithmetic.

Separate chaining explained: linked lists per bucket, load factor math, Java's HashMap source, the 2011 DoS attack, and why O(1) lookup isn't always guaranteed.

Open addressing hash table explained: linear probing, quadratic probing, double hashing, load factor math, tombstone deletion, and how Python, Go, and Ruby implement it.

Hash map load factor is the ratio that determines when O(1) breaks down. Learn why Java defaults to 0.75, how rehashing works, and the 2011 hash DoS attack.

A hash collision is guaranteed by pigeonhole logic. Learn chaining vs open addressing, load factor thresholds, and how to explain it in your interview.

Learn what is a hash function, how collision handling and load factor work, and the four interview patterns that depend on O(1) lookup.

An adjacency matrix answers edge queries in O(1). Learn the time complexity, O(V²) space cost, and exactly when to pick it over an adjacency list.

An adjacency list maps each vertex to its neighbors. Learn how it works, how to build it in Python and TypeScript, and why every graph algorithm starts here.

Learn topological sort for coding interviews: Kahn's algorithm, DFS with cycle detection, O(V+E) complexity, and the LeetCode problems that test it.

Learn how breadth-first search works, why it guarantees the shortest path, and how to recognize BFS patterns in coding interviews. With Python examples.

Learn how the depth-first search algorithm works on trees and graphs, its O(V+E) complexity, and the six interview patterns built on DFS.

The linear search algorithm explained for coding interviews: time complexity, when to use it over binary search, and how it hides in brute-force solutions.

The binary search algorithm explained: O(log n) intuition, the integer overflow bug, three interview forms, and implementation in Python and TypeScript.

Master the fast and slow pointer technique: cycle detection, finding the middle of a linked list, Happy Number, and Find Duplicate. O(1) space.

The sliding window technique turns O(n²) into O(n). Learn fixed vs variable windows, how to recognize the pattern, and the template for coding interviews.
Learn the two pointer algorithm: the elimination argument, converging and fast-slow variants, and when sorted input makes O(n²) brute force unnecessary.

Brute force coding interview strategy: state it first, name the waste, then optimize. Learn the complexity signals and how to narrate it under pressure.
What is backtracking? It's recursion with an undo step. Learn the choose-explore-undo pattern, Python code for subsets, and the two interview bugs to avoid.

Learn the divide and conquer algorithm pattern: merge sort, binary search, quicksort, time complexity, and how to spot it in coding interviews.

What is a greedy algorithm? Learn the greedy choice property, optimal substructure, and when greedy beats DP — with Python examples and interview tips.

What is dynamic programming? It caches overlapping subproblems to turn O(2^n) recursion into O(n). Learn memoization, tabulation, and coin change.