i can improve a bit..

my logic is that
i will take the a[n/2][n/2] element (middle of the diagonal element)


if (num_2_b_search> a[n/2][n/2])
square sub matrix from a[0][0] till a[n/2][n/2] can be left out..

i mean divide the whole matrix in 4 half


A B
C D

in my above case
A is chopped off ..
left alone is B C D we can now search recursively..

t(n)= 3 (t/4)+ constant

t(n)= O(n^(log 3 base 4)) which is better than linear..

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to