Search
⌘K

Leetcode 1064. Fixed Point

Given a sorted (strictly increasing) integer array, find an index i such that A[i] == i and return it (or -1 if none). Use the monotonic property of A[i]-i to guide a binary search for O(log n) time.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.