Infosys
Company
In an X's and 0's game (i.e. TIC TAC TOE) if you write a program for this give a fast way to generate the moves by the computer. I mean this should be the fastest way possible. The answer is that you need to store all possible configurations of the board and the move that is associated with that. Then it boils down to just accessing the right element and getting the corresponding move for it. Do some analysis and do some more optimization in storage since otherwise it becomes infeasible to get the required storage in a DOS machine.
Read Solution (Total 1)
-
- if system starts first start first then 9 possible ways
next human
system again will have 7 chances
next human
so on..
9*7*5*3*1=945 configarations should be maintained - 11 years agoHelpfull: Yes(3) No(0)
Infosys Other Question