Cody

# Problem 1478. Hamiltonian Cycle

Solution 1872702

Submitted on 12 Jul 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))

Error in solution: Line: 2 Column: 6 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

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))

Error in solution: Line: 2 Column: 6 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

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))

Error in solution: Line: 2 Column: 6 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

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))

Error in solution: Line: 2 Column: 6 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.