Complete knight tour coding with efficient implementation.