Skip to content

Code challenge

Binary Search

Problem

Given a sorted ascending array `nums` and a `target`, return its index or -1 if not present. Run in O(log n).
Editor · javascript4 lines · 54 chars
Back to topic
Binary Search — Searching Algorithms · Aevrofy