Time complexity: O(log(n))
Space complexity: O(1)
Runtime: 0 ms, faster than 100.00% of Java online submissions for Search Insert Position. Memory Usage: 43.1 MB, less than 15.26% of Java online submissions for Search Insert Position.