T
tkumar
OFFICIAL
07 Oct 2026, 18:48
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.