On Feb 7, 11:32 am, vijay <[email protected]> wrote:
> Write code to find the number of increasing paths from (0,0) to (x,y)

Is equal to permuting 'x' number of H (horizontal unit path) and 'y'
number of V (vertical unit path)

= fact(x+y) / [fact(x)*fact(y)]

where fact(n) represents factorial of n.

Each permutation gives a path.

Ex : For (x,y) = (3,4) a permutation of H H V H V V V gives the path
as 0,0 -> 1,0 -> 2,0 -> 2,1 -> 3,1 -> 3,2 -> 3,3 -> 3,4

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

Reply via email to