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]
327 Solvers
Find the sum of the elements in the "second" diagonal
819 Solvers
Solve the set of simultaneous linear equations
150 Solvers
Rotate input square matrix 90 degrees CCW without rot90
243 Solvers
Permute diagonal and antidiagonal
152 Solvers
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply Today