This problem was asked by Google.

A knight's tour is a sequence of moves by a knight on a chessboard such that all squares are visited once.

Given N, write a function to return the number of knight's tours on an N by N chessboard.

Please check the main.js snippet for the solution.

This solution originally posted at: Github by @Murillo2380