Two lessons:
Binary search works on any monotonic function, not just sorted arrays. Here, increases as increases, so you can binary search over
When forbidden from using built-in functions, binary search often replaces them efficiently
This same pattern applies to cube roots, nth roots, and other inverse operations. If you can check a candidate answer quickly, binary search finds it in log time.