Question: We wish to store tic - tac - toe boards in a hash table similar to the Exercise to Try in the recorded hash table

We wish to store tic-tac-toe boards in a hash table similar to the "Exercise to Try" in the recorded hash table lecture, except here we will stick to conventional 3 by 3 boards.
a) How big should the hash table be if we consider all possible boards including ones which would not occur in a normal game (e.g.4 X's and 2 O's)?
b) How big should the hash table be if we only consider boards that would actually occur in a real game, meaning either the same number of X's and O's or one more X than O? That includes the empty board, boards with just one X, boards with one X and one O, boards with two X's and one O etc.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!