What to do when i or j becomes less than 0 or more than n

while using recursion and storing the results in dp array, what to do in above scenario.

Plz refer to the online video lecture given under dynamic programming on the optimal game strategy