R
rkumar
OFFICIAL
06 Oct 2026, 10:02
Clean C++ solution, beats most submissions.
The answer space is monotonic, so binary search on it. Be careful with the loop condition (lo < hi vs lo <= hi) and how you move the bounds.