Time: O(n) = log n, _O_(n) = log n, Q(n) = log n

Space:

O(1)