◐ Shell
reader mode source ↗
Skip to content
Open
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
3 changes: 2 additions & 1 deletion Search/BinarySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*/

function binarySearchRecursive(arr, x, low = 0, high = arr.length - 1) {
const mid = Math.floor(low + (high - low) / 2)

if (high >= low) {
if (arr[mid] === x) {
Expand Down
Loading
Toggle all file notes Toggle all file annotations