typo in above code..find t(n+1) On Sun, Aug 14, 2011 at 12:37 AM, Kamakshii Aggarwal <kamakshi...@gmail.com>wrote:
> if steps are between banks then try dis. > if n=3 steps > then find t(n+2) > and use the fibonacci formula t(n)=t(n-1)+t(n-2) > t(1)=1; > t(2)=2; > now this will work ... > > > On Sun, Aug 14, 2011 at 12:34 AM, Kamakshii Aggarwal < > kamakshi...@gmail.com> wrote: > >> i am sorry.i misinterpret the question...i dint c that the steps are >> between banks.. >> >> >> On Sun, Aug 14, 2011 at 12:26 AM, ankit tyagi <ankittya...@gmail.com>wrote: >> >>> seems fine.. >>> >>> >>> On Sun, Aug 14, 2011 at 12:13 AM, Mohit Goel >>> <mohitgoel291...@gmail.com>wrote: >>> >>>> there are 5 possibilities ..5th one is _12_..other as specified by >>>> ankit... >>>> >>>> >>>> t(1) =2 (it can directly jump to anathor bank) >>>> t(2) =3 ( _2_,_1_,_12_) >>>> >>>> t(3) =5... >>>> thats how fibonnaci goes on ....plz correct if wrong... >>>> >>>> >>>> -- >>>> 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. >>> >> >> >> >> -- >> Regards, >> Kamakshi >> kamakshi...@gmail.com >> > > > > -- > Regards, > Kamakshi > kamakshi...@gmail.com > -- Regards, Kamakshi kamakshi...@gmail.com -- 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.