DrawCode

Binary Search

Given a sorted array `nums` and `target`, return the index of `target` or `-1` if not found.

Browse free without an account. Sign in to save progress, sync likes, and open your canvas workspace.