0 votes
in Other by

Count possible paths in an mXn matrix from top left to bottom right?

1 Answer

0 votes
by

class Tree {static int numberOfPaths(int a, int b)    {if (a == 1 || b == 1)return 1;return numberOfPaths(a- 1, b) + numberOfPaths(a, b - 1);      }public static void main(String args[])    {System.out.println(numberOfPaths(3, 3));    }} 

...