Your question is Rabbit Grid Path Count. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
In a simplified Susquehanna International Group grid-navigation model, a rabbit starts at the top-left square of a rectangular grid and must reach the bottom-right square. On each move, it may move exactly one square right or one square down.
Implement count_paths(rows, cols) to return the number of distinct valid paths. Two paths are different if their sequences of moves differ.
rows and cols, representing the number of grid rows and columns.(0, 0) to (rows - 1, cols - 1).O(cols) auxiliary space.def count_paths(rows, cols):