Project

General

Profile

Bug #7409 ยป bsearch-time-complexity-doc.patch

Anonymous, 11/20/2012 06:32 PM

View differences:

array.c
* ary.bsearch {|x| block } -> elem
*
* By using binary search, finds a value from this array which meets
* the given condition in O(n log n) where n is the size of the array.
* the given condition in O(log n) where n is the size of the array.
*
* You can use this method in two use cases: a find-minimum mode and
* a find-any mode. In either case, the elements of the array must be
range.c
* rng.bsearch {|obj| block } -> value
*
* By using binary search, finds a value in range which meets the given
* condition in O(n log n) where n is the size of the array.
* condition in O(log n) where n is the size of the array.
*
* You can use this method in two use cases: a find-minimum mode and
* a find-any mode. In either case, the elements of the array must be
    (1-1/1)