Question DSA-SRCH-0048
MediumWhat is the time complexity of searching a row-wise and column-wise sorted n × n matrix by starting at the top-right corner?
- A.
O(n)
- B.
O(log n)
- 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 row-wise and column-wise sorted n × n matrix by starting at the top-right corner?
O(n)
O(log n)
Sign up free to see the answer and a step-by-step explanation.
O(n²)
O(n log n)