Compute number of possible arrangements in the battleship game with different methods.

https://en.wikipedia.org/wiki/Battleship_(game)