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 114 Flatten Binary Tree to Linked List
Solutions for LeetCode 114, medium, tags: tree, depth-first search, linked list, stack, binary tree.
-
LeetCode 236 Lowest Common Ancestor of a Binary Tree
Solutions for LeetCode 236, medium, tags: tree, dfs, binary tree.
-
LeetCode 1143 Longest Common Subsequence
Solutions for LeetCode 1143, medium, tags: string, dynamic programming.
-
LeetCode 312 Burst Balloons
Solutions for LeetCode 312, hard, tags: array, dynamic programming.
-
LeetCode 62 Unique Paths
Solutions for LeetCode 62, medium, tags: math, dynamic programming, combinatorics.
-
LeetCode 1091 Shortest Path in Binary Matrix
Solutions for LeetCode 1091, medium, tags: array, breadth-first search, matrix, shortest path.
-
LeetCode 138 Copy List with Random Pointer
Solutions for LeetCode 138, medium, tags: hash table, linked list.
-
LeetCode 239 Sliding Window Maximum
Solutions for LeetCode 239, hard, tags: array, queue, sliding window, heap, monotonic queue.
-
LeetCode 78 Subsets
Solutions for LeetCode 78, medium, tags: array, backtracking, bit manipulation.
-
LeetCode 647 Palindromic Substrings
Solutions for LeetCode 647, medium, tags: string, dynamic programming, two pointers.
Recent Posts
-
System Design - How Go's Goroutine Scheduler Works
How Go's goroutine scheduler works: the GMP model (Goroutines, OS Threads, Processors), work stealing, preemption, netpoller integration, and a source code walkthrough from the Go runtime.
-
System Design - How Columnar Storage Works
How columnar storage works: row vs column layout, compression techniques, vectorized execution, Apache Parquet internals, and why modern analytics engines like ClickHouse and DuckDB are so fast.
-
System Design - How Raft Consensus Works
How the Raft consensus algorithm works: leader election, log replication, safety guarantees, membership changes, and source code walkthrough from the etcd/raft implementation.
-
System Design - How eBPF Works
How eBPF works in the Linux kernel: architecture, program types, the verifier, JIT compilation, maps for state sharing, helper functions, and real-world use cases in observability, networking, and security.
-
LeetCode 199 Binary Tree Right Side View
Solutions for LeetCode 199, medium, tags: tree, depth-first search, breadth-first search, binary tree.
-
LeetCode 417 Pacific Atlantic Water Flow
Solutions for LeetCode 417, medium, tags: array, depth-first search, breadth-first search, matrix.
-
LeetCode 124 Binary Tree Maximum Path Sum
Solutions for LeetCode 124, hard, tags: tree, depth-first search, dynamic programming, binary tree.
-
LeetCode 973 K Closest Points to Origin
Solutions for LeetCode 973, medium, tags: array, math, divide and conquer, geometry, sorting, heap, quickselect.