[algogeeks] Re: Divide the array into groups

2011-01-31 Thread sankalp srivastava
@above Many ways to do this problem One will be to find the bfs (there will be many and this will lead to a forest ) This , in turn can be done in O(e+v) , using adjancy list or matrix . Whenever , we cannot go further , start from any new uncovered node , and keep exploring recursively .Keep a

[algogeeks] Re: Divide the array into groups

2011-01-30 Thread sankalp srivastava
why have you divided it into three . I mean it can be divided into many groups of consecutive . Please write the statement properly ! On Jan 30, 11:13 am, snehal jain learner@gmail.com wrote: @nishanth divide into groups ( not necessarily 2) in as many group as possible.. such that

Re: [algogeeks] Re: Divide the array into groups

2011-01-30 Thread snehal jain
@above ignore my second example.. its incorrect.. go by 1st one On Sun, Jan 30, 2011 at 6:11 PM, sankalp srivastava richi.sankalp1...@gmail.com wrote: why have you divided it into three . I mean it can be divided into many groups of consecutive . Please write the statement properly ! On