Re: [algogeeks] Re: Can you guys help me how to approach this problem !!!

2009-12-05 Thread Aditya Shankar
Hi, Consider the sequence 1,2,3,4,5,6...,n. There are n^2 blocks, so the question may not be correct. Regards Aditya Shankar -- 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.

[algogeeks] Re: Can you guys help me how to approach this problem !!!

2009-12-05 Thread Harshith
I might be wrong here but, why can't you just sort the block A[i..j] it will take O((j-i)log(j-i)) (there are many O(n logn) sorting algorthms) steps and then just look if they are in sequence trivially another j-i steps. On Dec 3, 1:33 am, Vinoth Kumar wrote: > I kinda need the worst case also t