Solution 1: accepted 0ms
Binary. Conversion needed to gain precious result. For instance, for number 5, mid will be 2, int 5/2 = 2, which is not what we expect.
Time: O(logn)
Space: O(1)
|
|
Binary. Conversion needed to gain precious result. For instance, for number 5, mid will be 2, int 5/2 = 2, which is not what we expect.
Time: O(logn)
Space: O(1)
|
|