Skip to main content
Binary Search | AlgoCracked
AlgoCracked
ProblemsBinary Search
Easy57.0% acceptance
Blind75ArrayBinary Search

Binary Search

Given a sorted (ascending) array of distinct integers nums and an integer target , return the index of target if it is present, otherwise -1 . Your algorithm must run in O(log n) time. Input format Input is [nums, target] , e.g. [[-1,0,3,5,9,12],9] .

Loading workspace…