[algogeeks] Re: hi...one questions

2006-07-15 Thread Googmeister
Atamyrat Hezretguliyew wrote: > http://web.mit.edu/~mip/www/probs.html > > [12] Sorting by reversals (ONI'04) > You are given an array A[1..N]. Your goal is to sort A by the > following type of operation: pick some indices i,j and reverse the > subarray A[i..j]. Such an operation costs j-i+1, i.e

[algogeeks] Re: hi...one questions

2006-07-14 Thread Atamyrat Hezretguliyew
http://web.mit.edu/~mip/www/probs.html [12] Sorting by reversals (ONI'04) You are given an array A[1..N]. Your goal is to sort A by the following type of operation: pick some indices i,j and reverse the subarray A[i..j]. Such an operation costs j-i+1, i.e. the length of the portion which is rever