Binary Search Done Correctly: Invariants Over Memorization
The template everyone thinks they know โ invariant included. Python solution and complexity analysis for the modified binary search interview pattern.
The Augmented Dev ยท Archive
Dynamics 365, Power Platform, AI, system design, and web development โ filter by theme or search across every post.
Newsletter
One email per post. No spam, no tracking pixels, unsubscribe anytime.
11 of 325 articles tagged binary-search
The template everyone thinks they know โ invariant included. Python solution and complexity analysis for the modified binary search interview pattern.
Minimum ship capacity via a greedy day-splitting check. Python solution and complexity analysis for the modified binary search interview pattern.
Range of a duplicated target via lower and upper bound in O(log n). Python solution and complexity analysis for the modified binary search interview pattern.
Converge on the rotation seam via right-edge comparison. Python solution and complexity analysis for the modified binary search interview pattern.
Climb the slope โ halving works even on unsorted data. Python solution and complexity analysis for the modified binary search interview pattern.
Search on eating speed with a ceiling-division check. Python solution and complexity analysis for the modified binary search interview pattern.
The O(log min(m, n)) partition argument, demystified. Python solution and complexity analysis for the modified binary search interview pattern.
One binary search over rows*cols with divmod index mapping. Python solution and complexity analysis for the modified binary search interview pattern.
The lower_bound boundary template every variant builds on. Python solution and complexity analysis for the modified binary search interview pattern.
The rotated classic โ decide which half is sorted, then range-check. Python solution and complexity analysis for the modified binary search interview pattern.
First search-on-the-answer: largest k with k*k at most x. Python solution and complexity analysis for the modified binary search interview pattern.