LeetCode 704: Binary Search — Step-by-Step Visual Trace
Easy — Binary Search | Array | Divide and Conquer
The Problem
Given a sorted array of integers and a target value, return the index of the target if it exists in the array, otherwise return -1. The algorithm must run in O(log n) time complexity.
Appr...
blog.tracelit.dev1 min read