Cody

Problem 1478. Hamiltonian Cycle

Solution 1917613

Submitted on 31 Aug 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
A=[0 1 0 0 ; 0 0 1 0 ; 0 0 0 1 ; 1 0 0 0]; T=[1 2 3 4]; y_correct = true; assert(isequal(isHamiltoniaCycle(A,T),y_correct)) A=[0 1 0 0 ; 0 0 1 0 ; 0 0 0 1 ; 0 1 0 0]; T=[1 2 3 4]; y_correct = false; assert(isequal(isHamiltoniaCycle(A,T),y_correct))

Undefined function 'isHamiltoniaCycle' for input arguments of type 'double'. Error in Test1 (line 4) assert(isequal(isHamiltoniaCycle(A,T),y_correct))

2   Fail
A=[0 1 0 1 ; 1 1 1 0 ; 0 1 1 0 ; 0 0 1 0]; T=[1 2 3 4]; y_correct = false; assert(isequal(isHamiltoniaCycle(A,T),y_correct))

Undefined function 'isHamiltoniaCycle' for input arguments of type 'double'. Error in Test2 (line 4) assert(isequal(isHamiltoniaCycle(A,T),y_correct))

3   Fail
A=[0 1 0 1 ; 1 1 1 0 ; 0 1 1 0 ; 0 0 1 0]; T=[3 2 1 4 ]; y_correct = true; assert(isequal(isHamiltoniaCycle(A,T),y_correct))

Undefined function 'isHamiltoniaCycle' for input arguments of type 'double'. Error in Test3 (line 4) assert(isequal(isHamiltoniaCycle(A,T),y_correct))

4   Fail
A=[0 1 0 1 ; 1 1 1 0 ; 0 1 1 0 ; 0 0 1 0]; T=[2 3 2 3 ]; y_correct = false; assert(isequal(isHamiltoniaCycle(A,T),y_correct))

Undefined function 'isHamiltoniaCycle' for input arguments of type 'double'. Error in Test4 (line 4) assert(isequal(isHamiltoniaCycle(A,T),y_correct))

Suggested Problems

More from this Author10