find the closest number from sorted array