Dinnamic programming problem. Just read any example about it.
On Feb 12, 8:13 am, "Abhijeet Singh" <[EMAIL PROTECTED]> wrote: > I have stones numbered from A-K and I have a Frog which can make a jump > of one stone at a time or two stones at a time but no more then that. > I will explain , assumes my stones are ABCDEFG.... K > At any point say A, the frog can jump from A-B or from A-C but not from A-D > or otherwise, when it reaches J, it can only make a hop of 1 as there are no > more stones after that. Frog can not jump backwards. > > In how many ways can he reach from A-K, give a recursive formula for that. > > Print all possible paths that the Frog can choose while moving from A-K --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---