Consider the bottom half elment of the given 2 - D array. if it is less than
the number to be search, ignore the whole column and if greater  ignore the
whole row. if it is equal note the array index. repeat the above procedure
till all rows and column are scanned. By doing with complexity less than
O(n), we can search the required number from 2D array.


On Fri, Jul 2, 2010 at 3:26 PM, Anand <anandut2...@gmail.com> wrote:

> Consider the bottom half elment of the given 2 - D array. if it is less
> than the number to be search, ignore the whole column and if less ignore the
> whole row. if it equal note the array index. repeat the above procedure till
> all rows and column are scanned. By doing with complexity less than O(n), we
> can search the required number from 2D array.
>
>
> On Fri, Jul 2, 2010 at 10:39 AM, Rahul Kushwaha 
> <rahul.kushw...@gmail.com>wrote:
>
>> i think this might work
>> Binsearch on matrix for the column in which the element may lie...
>> use last element of the coloumn for comparisons....
>> \
>> then binsearch in the coloumn to find if the element is there or not....
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algoge...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to