Pergunta de entrevista da empresa Microsoft

Solve 'Tic-Tac-Toe' Now we have a board and the game is currently proceeding. Write a function 'bool isFinished(char a, int x, int y) to decide whether game is finished when put one chess (a == 'O' or 'X') on (x, y) of the board. What data structure are you going to use? Write the whole function down on the paper If given more space, can you improve your solution?

Resposta da entrevista

Sigiloso

27 de fev. de 2012

Basic: check all the space on the board Better: only check the lines related to the input chess Best: use additional space to record information of each line