Define "Most efficient". Most time efficient: Convert the board to a 9-digit integer in base 3 and use that to index into a table with the result precomputed.
Most space efficient: Eight if statements Don On Jul 28, 8:01 am, Balaji S <[email protected]> wrote: > Given a 3X3 matrix , with 1's 0's and -1's ( 1 is player one 0 is player two > -1 is none) > > how ll you find who is the winner / draw in a tic tac toe game in the most > effiecient manner... > > -- > With Regards, > Balaji.S -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
