i m sorry i cant understand the question.. if there are n no. steps to cross and he can take only one step at a time.. then suppose n=3 then obviously doesnt he need to take step 1 first then step 2 then step 3.. ?? m confused!
On Sun, Aug 14, 2011 at 12:38 AM, Kamakshii Aggarwal <[email protected]>wrote: > typo in above code..find t(n+1) > > > On Sun, Aug 14, 2011 at 12:37 AM, Kamakshii Aggarwal < > [email protected]> 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 < >> [email protected]> 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 <[email protected]>wrote: >>> >>>> seems fine.. >>>> >>>> >>>> On Sun, Aug 14, 2011 at 12:13 AM, Mohit Goel <[email protected] >>>> > 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 [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. >>>>> >>>> >>>> -- >>>> 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. >>>> >>> >>> >>> >>> -- >>> Regards, >>> Kamakshi >>> [email protected] >>> >> >> >> >> -- >> Regards, >> Kamakshi >> [email protected] >> > > > > -- > Regards, > Kamakshi > [email protected] > > -- > 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. > -- 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.
