Given a tic tac toe board:
It is X's move. If there is an immediate win possibility, choose a square for an immediate win. Otherwise return 0.
Return absolute index of the square of choice. If multiple square are valid, return them in order.
Example:
Input a = [ 1 0 1 -1 1 0 0 -1 -1] Output wins is [3 4]
Tags
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply Today
8 players like this problem
8 players like this problem