count number of ways from (0,0) to (m,n)

You are given a m*n chess are at lower-most vertex,and you can move one step right or one step above your current co-ordinate.Find out the number of ways to reach point(m,n).


  1. if(i==0 || j==0)
    return 1;
    else return(f(i-1,j)+f(i,j-1));


Post a Comment

Popular posts from this blog