From cb064e5ce12c22356fd71c0841f9a98abc55a74d Mon Sep 17 00:00:00 2001 From: Bhaumik Mistry Date: Wed, 27 Nov 2019 10:07:55 -0500 Subject: [PATCH] Update and rename knight-tour.cpp to knight_tour.cpp Add information about the file for brief intro --- Backtracking/{knight-tour.cpp => knight_tour.cpp} | 9 +++++++++ 1 file changed, 9 insertions(+) rename Backtracking/{knight-tour.cpp => knight_tour.cpp} (78%) diff --git a/Backtracking/knight-tour.cpp b/Backtracking/knight_tour.cpp similarity index 78% rename from Backtracking/knight-tour.cpp rename to Backtracking/knight_tour.cpp index 978a2d34b..f1bc9f72f 100644 --- a/Backtracking/knight-tour.cpp +++ b/Backtracking/knight_tour.cpp @@ -1,5 +1,14 @@ #include # 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]) {