Task 2.3.5 -- binary search implementation.