Solution using Array.BinarySearch Method