Company: Goldman Sachs_22july
Difficulty: medium
Player Move -> Computer Move Problem Description You are developing a web-based Tic-Tac-Toe game variant where each player can only put a pebble on the board against a computer. The objective of each player is to get three pebbles in a line on a 3x3 grid - horizontally, vertically or diagonally. While trying to stop the other player from achieving this goal, if in the player's last move, the human gets the first two turns to place the pebbles, and then the computer places the third pebble. You need to write a program to help the computer decide where the third pebble needs to be placed. Depending on the human's first two moves, there may be only one possible position to block the human from winning on the next move. In such a case, print that position as the output. Alternately, if there are multiple positions which can prevent the human from winning on the next move, print "Any Move". The cells in the 3x3 grid are denoted by the integers 0 to 8, as follows: 0 1 2 3 4 5 6 7 8 The follo