Cody

# Problem 492. Find best placement for ordered dominoes (harder)

Solution 2767648

Submitted on 1 Aug 2020
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
list = [4 1 3 4 1 1 5 5 3 5 0 4 2 0]; %2 correct = [2 1 3 7 6 5 4]; assert(isequal(findBestOrderedDominoes(list),correct))

Undefined function 'findPerfectOrderedDominoes' for input arguments of type 'double'. Error in findBestOrderedDominoes (line 14) temp = findPerfectOrderedDominoes(list, [s, i], used); Error in Test1 (line 11) assert(isequal(findBestOrderedDominoes(list),correct))

2   Fail
list = [1 1 2 5 7 5 8 1 1 3 7 8 3 6]; %3 correct = [2 6 4 1 5 7 3]; assert(isequal(findBestOrderedDominoes(list),correct))

Undefined function 'findPerfectOrderedDominoes' for input arguments of type 'double'. Error in findBestOrderedDominoes (line 14) temp = findPerfectOrderedDominoes(list, [s, i], used); Error in Test2 (line 11) assert(isequal(findBestOrderedDominoes(list),correct))

3   Fail
list = [8 5 3 9 10 6 6 2 2 17 18 14 9 5]; %6 correct = [3 1 2 7 4 5 6]; assert(isequal(findBestOrderedDominoes(list),correct))

Undefined function 'findPerfectOrderedDominoes' for input arguments of type 'double'. Error in findBestOrderedDominoes (line 14) temp = findPerfectOrderedDominoes(list, [s, i], used); Error in Test3 (line 11) assert(isequal(findBestOrderedDominoes(list),correct))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!