O(log(n)) O(1)