human
Count all possible paths from top left to bottom right of a mXn matrix | Returns count of possible paths to reach cell at row number m and column number n from the topmost leftmost cell ( cell at 1 , 1 ).
Create a 1D array to store results of subproblems.
Driver Code"
Solution in Python:

Write me a code to count all possible paths from top left to bottom right of a mXn matrix and the other steps required?
assistant
#Here is code to count all possible paths from top left to bottom right of a mXn matrix and the other steps required.
 def numberOfPaths ( p , q ) :
	dp = [ 1 for i in range ( q ) ]
	for i in range ( p - 1 ) :
		for j in range ( 1 , q ) :
			dp [ j ] += dp [ j - 1 ]
	return dp [ q - 1 ]
print ( numberOfPaths ( 3 , 3 ) )