Monday, September 10, 2007

Matrix Search

Big O Notation: The symbol O is used to describe an asymptotic upper bound for the magnitude of a function in terms of another, usually simpler, function.

Mathematically, you can define that f(n) is O(g(n)) then the following should hold.
1) f(n)< c * g(n) for all n > m.

Or may be better would that you search it out or may have again wikipedia

Challenge!!
I have a matrix say of n X m size. Each of its column and row are sorted independently. Would you able to Boggle your mind to get up with any algorithm, any damn idea that sounds safely interesting that you are able to search an item with utmost efficiency in terms of both space and time.

*Mark your answers with subject as “Matrix Solution”

No comments: