Merge pull request #642 from TheAlgorithms/bugfix-knight-tour-file-name

bugfix Update and rename knight-tour.cpp to knight_tour.cpp
This commit is contained in:
Bhaumik Mistry
2019-11-27 12:52:55 -05:00
committed by GitHub

View File

@@ -1,5 +1,14 @@
#include<bits/stdc++.h>
# define n 8
/**
A knight's tour is a sequence of moves of a knight on a chessboard
such that the knight visits every square only once. If the knight
ends on a square that is one knight's move from the beginning
square (so that it could tour the board again immediately, following
the same path), the tour is closed; otherwise, it is open.
**/
using namespace std;
bool issafe(int x,int y,int sol[n][n])
{