Articles tagged with #Algorithms
A curated list of engineering series, deep dives, and notes related to #Algorithms.
Building a Custom In-Memory Data Store in Java: The Collections Capstone
Build a production-grade in-memory key-value database in Java from scratch using custom data structures: HashMaps, LRU caches, priority queues, and SkipLists.
Java IdentityHashMap Internals: Reference Equality & Open Addressing Probing
Learn how Java IdentityHashMap uses reference equality (==) and flat array linear probing to prevent infinite recursion in object graph serializers.
Red-Black Tree Rotations Explained: Self-Balancing Trees in Java
Demystify Red-Black tree rotations and recoloring. Understand how Java TreeMap and HashMap maintain O(log N) balance guarantees.
Java HashMap Internals (Part 2): Load Factor, Resizing & Red-Black Treeification
Learn how Java HashMap resizes its bucket table when reaching load factor threshold, and how JDK 8 treeifies long bucket chains.
Java HashMap Internals (Part 1): Hashing Functions, Buckets & Separate Chaining
Deep dive into Java HashMap internals. Learn how hash functions, bitwise masking, and separate bucket chaining store key-value pairs.
Building a Double-Ended Queue (Deque) in Java for Sliding Window Algorithms
Implement a custom ArrayDeque in Java for dual-ended operations. Solve sliding window maximum algorithms in O(1) time.
Distributed Consensus Protocols: Paxos vs Raft Leader Election & Log Replication
Master distributed consensus. Compare Paxos and Raft leader election, log replication, safety invariants, and quorum math.
Building a Circular Queue in Java: Array Ring Buffers and Modulo Math
Build a high-performance circular array queue in Java. Eliminate O(N) array shifts using modulo arithmetic head and tail pointers.
Building a Custom Java Stack: LIFO Mechanics & Why Legacy Stack is Broken
Build a custom LIFO Stack in Java. Learn why java.util.Stack is obsolete and how ArrayDeque provides better performance.
Gossip Protocols & Cluster Membership: How Decentralized Nodes Maintain Topology
Master Gossip Protocols and cluster membership. Learn how decentralized nodes detect failures and propagate state without a central master.
Java LinkedList Internals: Building a Doubly Linked List from Scratch
Learn how Java LinkedList works under the hood by building a doubly linked list. Compare ArrayList vs LinkedList performance trade-offs.
Consistent Hashing & Virtual Nodes: Distributing Keys Without Mass Resharding
Master Consistent Hashing and Virtual Nodes. Learn how distributed caches and databases route keys without mass key migration.
How Java ArrayList Works Internally: Building a Dynamic Array from Scratch
Build a custom ArrayList in Java from scratch. Understand dynamic array resizing, System.arraycopy performance, and garbage collection.
Vector Clocks and Conflict Resolution: Detecting Concurrent Writes in Distributed State
Master Vector Clocks and causal consistency. Learn how vector timestamps detect concurrent writes, manage sibling branches, and resolve conflicts.
Time in Distributed Systems: Physical Clock Skew, NTP Drift, and Lamport Timestamps
Master time in distributed systems. Learn why physical clocks drift, NTP synchronization fails, and how Lamport Timestamps enforce logical event ordering.