CTCI 11.6 search in sorted matrix