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 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.
-
LeetCode 721 Accounts Merge
Solutions for LeetCode 721, medium, tags: array, hash table, string, depth-first search, breadth-first search, union find, sorting.
-
LeetCode 638 Shopping Offers
Solutions for LeetCode 638, medium, tags: array, dynamic programming, backtracking, bitmask, memoization.
Recent Posts
-
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 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
-
System Design - How TiDB TSO (Timestamp Oracle) Works
How TiDB's Timestamp Oracle (TSO) works: architecture, 64-bit timestamp layout, allocation algorithm, etcd persistence, client batching, and source code walkthrough from the tikv/pd repository.
-
LeetCode 1298 Maximum Candies You Can Get from Boxes
Solutions for LeetCode 1298, hard, tags: array, breadth-first search, graph.