@kartik the sequence 10000010011000110001111101101101011 can be done in 25 iterations whts urs?
On 6/28/11, kartik sachan <kartik.sac...@gmail.com> wrote: > anonymous u have to play with the index no of either G or > B...............and see how many shift it will require to reach it original > postion then max will be the ans.............. > > > well GBGBBB > if we start from right to left then G=3 and G=5 > first G have reach to 0 pos and second G have to reach to 1 pos > for first it require 2 steps and second require 4 steps > > so final ans will 4 > > > u have to think logic for this case too when like this come > GGGGBBBBGGGBBBBGGBGBG > > here G come one after other there is one trick for this.............u have > to thnik and implement the code is 6 to 8 line only > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.