Here is the link which discusses the porblem but instead of stones the problem talks of steps. But the problem is exactly the same. http://groups.google.com/group/programming-challenges/browse_thread/thread/cd2b733400989439/bb50217ab89c3f42?lnk=gst&q=Steps#bb50217ab89c3f42 Check out the discussion on the above link.
On 2/11/08, 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 > > > > -- Ciao, Ajinkya --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---