simple binary search algorithm pseudocode