Code Tag: Games

Should You Stop Rolling?

You are playing a game with a fair six-sided die. If you roll a number greater than 1, then you win that many gold coins. For example, if you roll a 5, then you win 5 gold coins. If you roll a 1, then you lose half of your money. You start this dice game …

Tic Tac Toe

What is the number of ways a tic tac toe game can be ended with a draw? Note: Either ‘O’ or ‘X’ can start first.