Sorted matrix search