JZLeetCode
RSS FeedHigh quality leet code solutions in Java, Python, C++, and Rust.
Comment in the Disqus section at the bottom of every post (you may have to refresh) if you have any questions. You can also share the solution on social media with the buttons at the bottom left of each post.
Please add a note that your reference or source is @JZLeetCode.
Social links for BuyMeCoffee is below and at the bottom right of every post. Donations are greatly appreciated and welcomed.
Read the blog posts or check About for more info.
Featured
-
LeetCode 394 Decode String
Solutions for LeetCode 394, medium, tags: string, stack, recursion.
-
LeetCode 56 Merge Intervals
Solutions for LeetCode 56, medium, tags: array, sorting.
-
LeetCode 215 Kth Largest Element in an Array
Solutions for LeetCode 215, medium, tags: array, divide and conquer, sorting, heap, quick select.
-
LeetCode 200 Number of Islands
Solutions for LeetCode 200, medium, tags: array, depth-first search, breadth-first search, union find, matrix.
-
LeetCode 739 Daily Temperatures
Solutions for LeetCode 739, medium, tags: array, stack, monotonic stack.
-
LeetCode 3 Longest Substring Without Repeating Characters
Solutions for LeetCode 3, medium, tags: hash table, string, sliding window.
-
LeetCode 378 LintCode 1272 Kth Smallest Element in a Sorted Matrix
Solutions for LeetCode 378 and LintCode 1272, medium, tags: array, binary search, heap, matrix.
-
LeetCode 3653 XOR After Range Multiplication Queries I
Solutions for LeetCode 3653, medium, tags: array, simulation.
-
LeetCode 874 Walking Robot Simulation
Solutions for LeetCode 874, medium, tags: array, hash table, simulation.
-
LeetCode 631 Design Excel Sum Formula
Solutions for LeetCode 631, hard, tags: design, graph, depth-first search, topological sort.
Recent Posts
-
System Design - How Write-Ahead Logging (WAL) Works
How Write-Ahead Logging (WAL) works: the core protocol behind database durability and crash recovery. Covers the WAL principle, record structure, buffer management, checkpoints, crash recovery, and a source code walkthrough from PostgreSQL.
-
System Design - How LSM Trees Work (The Engine Behind RocksDB, LevelDB, and Cassandra)
How Log-Structured Merge Trees (LSM Trees) work: the write-optimized data structure behind RocksDB, LevelDB, Cassandra, and TiKV. Covers memtable, WAL, SSTables, compaction strategies, bloom filters, and a source code walkthrough from the facebook/rocksdb repository.
-
System Design - How Consistent Hashing Works
How consistent hashing works: the problem with naive hashing, the hash ring, virtual nodes, real-world usage in DynamoDB and Memcached, and a source code walkthrough of Go's jump consistent hash and ketama implementations.
-
System Design - How the Raft Consensus Algorithm Works
How the Raft consensus algorithm works: leader election, log replication, safety guarantees, and a source code walkthrough of the etcd/raft implementation in Go.
-
AI Machine Learning - Precision and Recall
artificial intelligence machine learning, understanding precision, recall, accuracy, confusion matrix, and the tradeoffs between them in classification problems
-
Linux Cheatsheet, tips and Commands
Updated:tips for linux commands and tips
-
Envoy Proxy: The Invisible Backbone of Microservices
system design basics - Envoy proxy, north-south vs east-west traffic, its operating modes, how it competes with Nginx, and its relationship with Istio.
-
System Design - Proxy vs Reverse Proxy
system design basics - forward proxy vs reverse proxy, differences, use cases, and examples