http://ideone.com/xv73J


On Fri, Jul 8, 2011 at 2:16 AM, Piyush Sinha <[email protected]>wrote:

> @Sunny...can u post a definite algo for it??
>
> On 7/8/11, Ravi Shukla <[email protected]> wrote:
> > @sunny , yep it looks DP. more of MCM.
> >
> > solve for substrings of length 1,2,3.
> > and then apply DP[i][j]=max score for a substring from i to j.
> > =max(DP[i][k]+DP[k][j]) where k>i && k<j .
> >
> > The complexity this approach renders would be O(n^3).
> > with O(n^2) space complexity.
> >
> > anyone anything better ?
> >
> > Thanks.
> > Ravi Shukla
> > CSE Final Year.
> > BIT Mesra, Ranchi
> >
> > --
> > 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.
> >
> >
>
>
> --
> *Piyush Sinha*
> *IIIT, Allahabad*
> *+91-8792136657*
> *+91-7483122727*
> *https://www.facebook.com/profile.php?id=100000655377926 *
>
> --
> 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.
>
>


-- 
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee

-- 
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.

Reply via email to