Cody

Solution 100597

Submitted on 20 Jun 2012 by Aurelien Queffurust
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% a = ... [ 7 2 5 4 0 8 1 6 3]; tf_correct = true; assert(isequal(knights_tour(a),tf_correct))

tf = 1 index = 1 index = 2 index = 3 index = 4 index = 5 index = 6 index = 7

2   Pass
%% a = ... [ 1 0 0 0 0 2]; tf_correct = true; assert(isequal(knights_tour(a),tf_correct))

tf = 1 index = 1

3   Pass
%% a = ... [ 15 5 12 3 0 2 9 6 8 11 4 13 1 14 7 10]; tf_correct = false; assert(isequal(knights_tour(a),tf_correct))

tf = 1 index = 1 index = 2 index = 3 index = 4 index = 5 index = 6 index = 7 index = 8 index = 9 index = 10 index = 11 index = 12 index = 13 index = 19

4   Pass
%% a = ... [ 0 5 12 3 15 2 9 6 8 11 4 13 1 14 7 10]; tf_correct = true; assert(isequal(knights_tour(a),tf_correct))

tf = 1 index = 1 index = 2 index = 3 index = 4 index = 5 index = 6 index = 7 index = 8 index = 9 index = 10 index = 11 index = 12 index = 13 index = 14