Cody

Solution 1840836

Submitted on 6 Jun 2019 by Hans Kramer
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   Pass
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))

minsum = 7 minsum = 3 minsum = 2

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

minsum = 26 minsum = 24 minsum = 20 minsum = 16 minsum = 14 minsum = 12 minsum = 10 minsum = 8 minsum = 6 minsum = 4 minsum = 3

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

minsum = 48 minsum = 40 minsum = 34 minsum = 32 minsum = 28 minsum = 22 minsum = 16 minsum = 10 minsum = 9 minsum = 7 minsum = 6

Suggested Problems