Divisor Game - Dynamic Programming / Game Theory


Could you use the minimax algorithm to solve this as well? And if so, would that be considered a top down approach as opposed to bottom up?

Asking because I know awhile back I used that in a project to ensure an optimal move for a cpu player in a tic tac toe game, but I wasn’t sure if that would actually deliver an optimal solution to just simply figuring out if the player would win or not…

The solution is “n % 2 == 0”.