what is the initial value of length that u r passing??

On Sun, Aug 28, 2011 at 6:47 PM, prashant thorat
<prashantnit...@gmail.com>wrote:

> Hi, you can do this by recursion ,
>
> printPath (int length)
> {
>  if(lenght == N) return;
> else
> {
>   if(lenght+1 >= N)  { Printf (" -->one step -->") call printPath
> (length+1) }
>  else if(lenght+2 >= N)  { Printf (" -->two steps -->") call printPath
> (length+2) }
> else
> return;
>
> }
> }
> On Sun, Aug 28, 2011 at 5:42 PM, himanshu kansal <
> himanshukansal...@gmail.com> wrote:
>
>> you have a path of N steps....
>> at every step, you can take onl;y 1 step or 2 steps.....
>>
>> how to print all the possible paths that you can take......
>>
>> PS: please dont give the exact code.....your approaches will be
>> appreciated....:)
>>
>> --
>> 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.
>>
>>
>
>
> --
> Yours affectionately,
> Prashant Thorat
> Computer Science and Engg. Dept,
> NIT Durgapur.
>
>  --
> 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

-- 
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.

Reply via email to