Amazon Interview Question

1. Search in sorted 2d matrix. 2. Previous lesser element.