bsearch(x) (binary search): builtin.c (tested), with documentation and test case. Always yields an integer (even if input is unsorted); returns (-1 - ix) if x is not in input array.

This commit is contained in:
pkoppstein authored and Nicolas Williams committed 2014-12-27 18:44:20 -06:00
1 parent 56344670f4
commit 00f018a054
3 files changed
+58

No files matched your search

+4
View File
@@ -1111,3 +1111,7 @@ transpose
ascii_upcase
"useful but not for é"
"USEFUL BUT NOT FOR é"
bsearch(4)
[1,2,3]
-4