@1.. A recursive app shall do... @2 Isn't this problem similar to LCS problem where the constraint is the length of LCS being the size of the 2nd string and we need to keep track of the count for that particular length. A slight modification to the LCS technique shall solve it..
On Dec 28, 3:07 pm, Prem Krishna Chettri <hprem...@gmail.com> wrote: > Well. this seems interesting question. > > 1> You have to break the string to the lowest possible subset. I know O(log > n) algo for this. > > 2> Number of possibilities of creating a second sentence from this subset. > This is subset formation and I guess will take O(nlogn) atleast for n > possible elements. > > > > > > > > On Wed, Dec 28, 2011 at 2:55 PM, Tamanna Afroze <afroze...@gmail.com> wrote: > > how? > > > -- > > 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.