Question DSA-SRCH-0012
MediumWhat is the time complexity of searching a sorted n × m matrix (rows and columns sorted) starting from the top-right corner?
- A.
O(n + m)
- B.
O(log(n × m))
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Searching and Binary Search question
What is the time complexity of searching a sorted n × m matrix (rows and columns sorted) starting from the top-right corner?
O(n + m)
O(log(n × m))
Sign up free to see the answer and a step-by-step explanation.
O(n × m)
O(n log m)