What is the most efficient algorithm that searches for a value in an m x n matrix. The matrix has the following properties:

  • Integers in each row are sorted from left to right.
  • The first integer of each row is greater than the last integer of the previous row.

1
O(n×logm)
2
O(log(n×m) )
3
O(m×n)
4
O(m+n)

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation