Knight's Tour (Wiki) with Backtracking in p5.js
Check out the tour with Warnsdorf's heuristic - Here.

Select board size -


P.S. This might take a while to complete the tour.