about | help | code help+videos | done | prefs |
Returns the index of the target value in a sorted array using binary search. Returns -1 if the target value is not in the array. The array will have a length >= 1 and does not contain any duplicate values. binarySearch([1, 3, 5, 7], 7) → 3 binarySearch([1, 3, 5, 7], 1) → 0 binarySearch([1, 3, 5, 7], 2) → -1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 330 Post-solution available
Copyright Nick Parlante 2017 - privacy