Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#252·CtCI-6th-Edition

[10.9] Sorted Matrix Search 'naive' solution has O(N + M) complexity

Author: RashairCreated Feb 4, 2024Updated Feb 4, 2024

In the solution to 10.9 task, the 'naive' solution is described as O(M log(N)), which isn't correct for the later algorithm. See example here: https://www.geeksforgeeks.org/search-element-sorted-matrix/

Source: careercup/CtCI-6th-Edition

View original on GitHubView discussion on GitHub