Code Explainers

Code explainers tagged #monotonic-predicate

ruby
# Binary search using Ruby's built-in Array#bsearch.
#
# There are two modes:
#   1. find-minimum mode  -> block returns true/false (monotonic)

Binary search patterns with Ruby's bsearch

binary-search algorithms ranges
Intermediate 7 steps