Skip to content

Latest commit

 

History

History
5 lines (5 loc) · 199 Bytes

README.md

File metadata and controls

5 lines (5 loc) · 199 Bytes

Solution

target definition = largest integer such that x^2 <= num f(x) = (x^2 <= num) What is the sorted range to search?
[1, num] -> optimize to [1, num / 2]
time: O(log(num / 2))