Binary search: Difference between revisions

m
Correct Wikipedia link
(Added Wren)
m (Correct Wikipedia link)
Line 20:
 
;Traditional algorithm
The algorithms are as follows (from [[wp:Binary search algorithm|Wikipedia]]). The algorithms return the index of some element that equals the given value (if there are multiple such elements, it returns some arbitrary one). It is also possible, when the element is not found, to return the "insertion point" for it (the index that the value would have if it were inserted into the array).
 
'''Recursive Pseudocode''':
Anonymous user