This repository contains fun programming problems I want to try; Some of them come from "Cracking the Coding Interview 6th Edition" by Gayle Laakmann McDowell.
A 2-player zero-sum game against the computer
Implemented using Minimax algorithm.
Starting with a pile of 13 coins
Each player take turn removing 1, 2 or 3 coins from the pile
Whoever takes the last coin loses.
Starting with a pile of 2n+1 coins
Each player take turn removing either 1, 2 or 3 coins
Whoever ends up with an even number of coins win.