Count all possible paths from source to destination in given 3D array
Given three integers p, q, and r, the task is to count all the possible paths from the cell (0, 0, 0) to cell (p-1, q-1, r-1) in a matrix of size (p, q, r). Movement is allowed only in three directions, which are along the positive direction of the three axes i.e. from any cell (i, j, k) movement is