make a running sum with -1 instead of 0 keep an array of the running sum.....in the array find out the indexes with with equal sum at farthest distance...those two will be the bouding points of maximum subsesequence..
On Sun, Jan 9, 2011 at 10:19 PM, bittu <[email protected]> wrote: > i think its DP Problem....still thinking on the soultion.. > > @ankur..ur approach nearly matches to mine..what i thought..but we > need actual solution.. > > > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
