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

2009-12-02 Thread daizi sheng
You guy check this solution. It is expected to be run in O(n lg n) for random permutation in average time. For worst case, I think we can improve it for that. Let's do an example firstly. 7 3 4 1 2 6 5 8 For *1*, it self is a block. Let's count the blocks containing *1* firstly. If a block

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

2009-12-02 Thread shah zeb
check this if How To Install Dreamweaver CS3 In Ubuntu Hardyhttp://eaziweb.blogspot.com/2009/12/how-to-install-dreamweaver-cs3-in.html Regards Shahzeb Farooq Chohan Software Engineer Cogilent Solutions Get your new Email address! Grab the Email name you've always wanted before

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

2009-12-01 Thread Vinoth Kumar
Given an array A which holds a permutation of 1,2,...,n. A sub-block A [i..j] of an array A is called a valid block if all the numbers appearing in A[i..j] are consecutive numbers (may not be in order. Given an array A= [ 7 3 4 1 2 6 5 8] the valid blocks are [3 4], [1,2], [6,5], [3 4 1 2], [3 4

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

2009-12-01 Thread sharad kumar
find out the subseq which are consecttive concatenate them at each level to get the entire set. On Tue, Dec 1, 2009 at 12:03 PM, Vinoth Kumar vinoth.ratna.ku...@gmail.comwrote: Given an array A which holds a permutation of 1,2,...,n. A sub-block A [i..j] of an array A is called a valid block