I am implementing a 2-dimensional data structure for a class. My desired approach is an “NxN” Array of objects.
So,
Cell[][] dataStructure = new Cell[N][N];
My current issue, is that I am very rusty with recursion. Each cell relies on the output of the cell to the left of it, and to the cell above it, to create its output.

Example:
Assuming standard X,Y directions, I would like to be able to call a
getOutputX method for a cell, Cell[X][Y], and it would recursively
call getOutputX for Cell[X-1][Y] and getOutputY for Cell[X][Y-1] until
it reaches the edge of the array. At this point, the outputs would
propogate back through the array and return the desired output for the
cell.
As I write this out I’m understanding more as I go along, and I feel like I’m very close. Any helpful input or hints would be appreciated.
My specific question is how to create a getOutput method that would get the required input from both the cell above, and the cell to the left of the desired output.
The algorithm is quite simple: