Given a sorted integer matrix where columns and rows are increasing, efficiently find if an element exists in this matrix (n x m).
Anonymous
should just be a binary search for row and then binary search for the index within the row. time complexity: O(log(n) + log(m))
Check out your Company Bowl for anonymous work chats.