search a sorted array for the 1st element greater than k