top of page
Search
Merge Intervals
"Merge Intervals" is one of those classic algorithm problems that shows up frequently in technical interviews. It's a great test of your...
Jun 203 min read
KSum
The KSum problem generalizes 2Sum, 3Sum, and 4Sum into a flexible recursive solution that can find all unique combinations of k numbers in an array that sum to a target. It’s a fantastic problem for practicing recursion, backtracking, and thinking about how to build modular solutions that scale with complexity. Once you’ve nailed KSum, you can solve any of the others as special cases.
May 285 min read
4Sum
This is a great follow-up to 2Sum and 3Sum. It challenges you to apply the same two-pointer strategy but adds complexity by requiring a quadruplet instead of a pair or triplet. This kind of problem comes up when you're working on systems that require combinatorial sum checks, like budgeting scenarios, fraud detection with transaction records, or even algorithmic trading strategies. The key here is optimization over brute-force enumeration.
May 275 min read
K Closest Points to Origin
Finding the nearest neighbors to a reference point is fundamental in recommendation engines, spatial queries, and clustering. The “K Closest Points to Origin” problem is a classic warm-up for Top-K selection using heaps or sorting optimizations.
May 154 min read
bottom of page