in reply to partition of an array

use splice to break up array.

Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.

Replies are listed 'Best First'.
Re^2: partition of an array
by mostvisited (Initiate) on Mar 09, 2009 at 05:11 UTC
    splice could be used to create the partition but how to get the kind of partition which satisfies the mentioned conditions. Actually i m not able to find any algorithm to implement it.