7 kyu

Knight's tour problem on (N x M) desk

90 of 213MrKoyl

Description:

In this Kata your task is to check the possibility to solve the 'Knight's tour problem' for the desk of the current size.

A knight's tour is a sequence of moves of a knight on a chessboard such that the knight visits every square exactly once. If the knight ends on a square that is one knight's move away 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.

In this Kata we will think only about open tours.

Input

n, m - desk size.

0 < n < 10.

0 < m < 10.

Output

Return true if a tour exist for the current desk. Otherwise return false

Algorithms

Stats:

CreatedDec 3, 2020
PublishedDec 3, 2020
Warriors Trained736
Total Skips13
Total Code Submissions1694
Total Times Completed213
JavaScript Completions90
C Completions26
Haskell Completions15
Python Completions92
Ruby Completions15
Total Stars8
% of votes with a positive feedback rating69% of 77
Total "Very Satisfied" Votes46
Total "Somewhat Satisfied" Votes15
Total "Not Satisfied" Votes16
Total Rank Assessments9
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • MrKoyl Avatar
  • JohanWiltink Avatar
  • rowcased Avatar
  • Glyxerine Avatar
  • ejini战神 Avatar
Ad