Find an element in a sorted matrix