Hash Map Internals: How Hash Tables Really Work
Deep dive into hash map internals -- hash functions, collision resolution (chaining vs open addressing), load factor, rehashing, and building a hash map from scratch in Python.
1745 posts · page 4 of 37
Deep dive into hash map internals -- hash functions, collision resolution (chaining vs open addressing), load factor, rehashing, and building a hash map from scratch in Python.
Master advanced heap patterns -- merge K sorted lists, find median from data stream with two heaps, top K elements, task scheduler, and more with Python heapq implementations.
Understand heap sort, why build-heap is O(n) not O(n log n), sift-down vs sift-up, in-place sorting, partial sort for top K, and comparisons with other sorts.
Master interval problems — merge intervals, insert interval, meeting rooms, interval scheduling, sweep line technique, and non-overlapping intervals with Python implementations.
Find where two linked lists intersect using the two-pointer technique, length difference method, and hash set — with Python implementations and complexity analysis.
Learn Floyd's tortoise and hare algorithm for cycle detection in linked lists — detect cycles, find the start, measure cycle length, with full Python code and proofs.
Master every linked list reversal pattern — iterative, recursive, reverse in groups of K, and reverse between positions m and n, with Python code and common pitfalls.
Learn to merge two sorted lists, merge K sorted lists with a heap, and implement merge sort on linked lists with full Python code and complexity analysis.
Master LCA problems — recursive DFS for binary trees, BST property shortcut, parent pointers, and binary lifting for O(log n) queries. Full Python code.
Design and implement an LRU Cache from scratch using a HashMap and Doubly Linked List for O(1) get and put, with Python code, OrderedDict shortcut, and real-world context.
Master matrix traversal patterns — spiral order, diagonal traversal, zigzag, boundary traversal, matrix rotation, transpose, search in 2D matrix, and set matrix zeroes with Python.
Master merge sort — recursive splitting, merging sorted halves, counting inversions, merge sort on linked lists, stability analysis, and O(n log n) guaranteed performance with Python.
Understand max flow, residual graphs, augmenting paths, Ford-Fulkerson, Edmonds-Karp, and the max-flow min-cut theorem with Python code.
Master N-ary tree traversals and Trie data structure — autocomplete, spell check, word dictionary, wildcard search. Complete Python implementations.
Master multi-source BFS for rotting oranges, walls and gates, 01-BFS, and matrix distance problems with Python implementations.
Master queue variants — simple queue, deque, circular queue, and priority queue. Implementations in Python with BFS, sliding window, and scheduling examples.
Learn the Rabin-Karp algorithm for string matching using rolling hash. Covers polynomial hashing, collision avoidance, multiple pattern matching, and comparison with KMP.
Master quick sort — Lomuto and Hoare partitions, pivot strategies, worst case analysis, Dutch National Flag, QuickSelect for kth element, and comparison with merge sort.
Explore randomized algorithms -- QuickSelect for O(n) kth element, reservoir sampling for streams, randomized quicksort, skip lists, bloom filters, and Monte Carlo vs Las Vegas classification.
Learn to convert recursive algorithms to iterative ones. Covers tail recursion, explicit stacks, iterative tree traversals, Morris traversal, and memoization as a bridge to DP.
Understand Red-Black trees — the 5 rules, insertion cases, color flips, rotations, comparison with AVL, and why Java TreeMap and Linux use them.
Compare all four shortest path algorithms with Python code, complexity analysis, and a decision flowchart for choosing the right one.
Master fixed-size and variable-size sliding window techniques. Covers minimum window substring, longest substring with K distinct chars, and string permutation problems.
Master stack-based parsing patterns — balanced parentheses, minimum removals, longest valid parentheses, decode string, and basic calculator with Python solutions.
Learn sqrt decomposition for O(sqrt(n)) range queries and updates, plus Mo's algorithm for answering offline queries efficiently. Full Python implementations included.
Master sparse tables for O(1) range minimum/maximum queries with O(n log n) preprocessing. Learn construction, idempotent functions, and when to use sparse tables over segment trees.
Build a calculator from scratch — learn infix, prefix, and postfix notation, the Shunting Yard algorithm, postfix evaluation, and Python implementation.
Master the monotonic stack pattern — solve Next Greater Element, Next Smaller, stock span, and circular array variants with Python templates and visual walkthroughs.
Master SCCs with Kosaraju's two-pass DFS and Tarjan's low-link algorithm, including condensation graphs and real applications in Python.
Master subarray sum techniques — prefix sum for range queries, Kadane's algorithm for maximum subarray, hash map for subarray sum equals K, sliding window, and maximum product subarray.
Learn suffix arrays from scratch -- naive and O(n log^2 n) construction, LCP arrays, pattern searching with binary search, and applications like longest repeated substring.
Master topological sorting with Kahn's BFS and DFS approaches. Solve course scheduling, build dependencies, alien dictionary, and longest path in DAG problems.
Build binary trees from inorder + preorder, inorder + postorder, and preorder + postorder. Hashmap optimization, edge cases, and Python recursive solutions.
Find the diameter of a binary tree using DFS, solve maximum path sum, and understand the two-BFS approach for general trees. Full Python implementations.
Serialize binary trees to strings and deserialize them back. BFS and DFS approaches with null handling, Python implementations, and real-world uses.
Master opposite-direction, same-direction, and fast-slow two pointer patterns. Includes templates, container with most water, cycle detection, and sort colors.
Master the Z-algorithm for pattern matching in O(n) time. Learn Z-array construction, the Z-box optimization, and applications like finding string periods and distinct substrings.
How Airflow executors work under the hood. SequentialExecutor, LocalExecutor, CeleryExecutor, and KubernetesExecutor compared with migration paths.
Replace sensor-based waiting with Airflow Datasets. Build producer-consumer DAGs, combine time and data triggers, and design dataset URIs for production.
Idempotent pipelines, backfilling, late data handling, error patterns, multi-environment setups, and common anti-patterns to avoid in Airflow.
Run Airflow in production with Docker Compose, Helm on Kubernetes, or managed services. Covers monitoring, logging, security, and database backends.
Unit test tasks, validate DAG structure, mock external services, and build CI/CD pipelines for Airflow. Prevent silent data loss with systematic testing.
Learn Apache Spark: RDDs, DataFrames, SparkSQL, the execution model, PySpark basics, platform comparisons, and essential performance optimization tips.
Prepare for data engineering interviews: SQL deep dives, Python coding, system design, data modeling, behavioral questions, and take-home project tips.
Learn the five pillars of data observability, anomaly detection, lineage tracking, incident response, and tools like Elementary, Monte Carlo, and Soda.
Build CI/CD workflows for data pipelines: lint SQL, validate DAGs, run tests, deploy dbt models, and manage dev/staging/prod environments.
Learn the data testing pyramid, unit testing transformations, contract testing between stages, and how to build reliable CI/CD test suites for pipelines.
Master dbt (data build tool): project structure, models, materializations, testing, Jinja templating, and how dbt became the standard for analytics engineering.