MCPcopy Create free account
hub / github.com/akshitagit/JavaScript / binarySearch

Function binarySearch

Algorithms/binarySearch.js:7–20  ·  view source on GitHub ↗

* Binary search is an efficient algorithm for finding an item from a sorted list of items. * It works by repeatedly dividing in half the portion of the list that could contain the item, * until you've narrowed down the possible locations to just one.

(arr, x, left, right)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

binarySearch.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected