Cody

# Problem 534. Find best domino orientation

Solution 1580655

Submitted on 11 Jul 2018 by Danuanping
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 = [5 2 3 7 4 9 2 3 8 2 3 5 8 2 7 8 4 2 8 2]; y_correct = [0 0 1 1 1 1 1 1 0 1]; assert(isequal(findBestDominoeOrientation(list),y_correct))

s = 35 sbest = 35 s = 29 sbest = 29 s = 35 s = 33 s = 35 s = 29 s = 35 s = 33 s = 31 s = 25 sbest = 25 s = 31 s = 29 s = 29 s = 23 sbest = 23 s = 29 s = 27 s = 39 s = 33 s = 39 s = 37 s = 39 s = 33 s = 39 s = 37 s = 31 s = 25 s = 31 s = 29 s = 29 s = 23 s = 29 s = 27 s = 35 s = 29 s = 35 s = 33 s = 35 s = 29 s = 35 s = 33 s = 31 s = 25 s = 31 s = 29 s = 29 s = 23 s = 29 s = 27 s = 35 s = 29 s = 35 s = 33 s = 35 s = 29 s = 35 s = 33 s = 27 s = 21 sbest = 21 s = 27 s = 25 s = 25 s = 19 sbest = 19 s = 25 s = 23 s = 35 s = 29 s = 35 s = 33 s = 35 s = 29 s = 35 s = 33 s = 31 s = 25 s = 31 s = 29 s = 29 s = 23 s = 29 s = 27 s = 39 s = 33 s = 39 s = 37 s = 39 s = 33 s = 39 s = 37 s = 31 s = 25 s = 31 s = 29 s = 29 s = 23 s = 29 s = 27 s = 33 s = 27 s = 33 s = 31 s = 33 s = 27 s = 33 s = 31 s = 29 s = 23 s = 29 s = 27 s = 27 s = 21 s = 27 s = 25 s = 33 s = 27 s = 33 s = 31 s = 33 s = 27 s = 33 s = 31 s = 25 s = 19 s = 25 s = 23 s = 23 s = 17 sbest = 17 s = 23 s = 21 s = 29 s = 23 s = 29 s = 27 s = 29 s = 23 s = 29 s = 27 s = 25 s = 19 s = 25 s = 23 s = 23 s = 17 s = 23 s = 21 s = 33 s = 27 s = 33 s = 31 s = 33 s = 27 s = 33 s = 31 s = 25 s = 19 s = 25 s = 23 s = 23 s = 17 s = 23 s = 21 s = 29 s = 23 s = 29 s = 27 s = 29 s = 23 s = 29 s = 27 s = 25 s = 19 s = 25 s = 23 s = 23 s = 17 s = 23 s = 21 s = 29 s = 23 s = 29 s = 27 s = 29 s = 23 s = 29 s = 27 s = 21 s = 15 sbest = 15 s = 21 s = 19 s = 19 s = 13 sbest = 13 s = 19 s = 17 s = 29 s = 23 s = 29 s = 27 s = 29 s = 23 s = 29 s = 27 s = 25 s = 19 s = 25 s = 23 s = 23 s = 17 s = 23 s = 21 s = 33 s = 27 s = 33 s = 31 s = 33 s = 27 s = 33 s = 31 s = 25 s = 19 s = 25 s = 23 s = 23 s = 17 s = 23 s = 21 s = 27 s = 21 s = 27 s = 25 s = 27 s = 21 s = 27 s = 25 s = 23 s = 17 s = 23 s = 21 s = 21 s = 15 s = 21 s = 19 s = 27 s = 21 s = 27 s = 25 s = 27 s = 21 s = 27 s = 25 s = 19 s = 13 s = 19 s = 17 s = 17 s = 11 sbest = 11 s = 17 s = 15 s = 37 s = 31 s = 37 s = 35 s = 37 s = 31 s = 37 s = 35 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 41 s = 35 s = 41 s = 39 s = 41 s = 35 s = 41 s = 39 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 37 s = 31 s = 37 s = 35 s = 37 s = 31 s = 37 s = 35 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 37 s = 31 s = 37 s = 35 s = 37 s = 31 s = 37 s = 35 s = 29 s = 23 s = 29 s = 27 s = 27 s = 21 s = 27 s = 25 s = 37 s = 31 s = 37 s = 35 s = 37 s = 31 s = 37 s = 35 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 41 s = 35 s = 41 s = 39 s = 41 s = 35 s = 41 s = 39 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 35 s = 29 s = 35 s = 33 s = 35 s = 29 s = 35 s = 33 s = 31 s = 25 s = 31 s = 29 s = 29 s = 23 s = 29 s = 27 s = 35 s = 29 s = 35 s = 33 s = 35 s = 29 s = 35 s = 33 s = 27 s = 21 s = 27 s = 25 s = 25 s = 19 s = 25 s = 23 s = 37 s = 31 s = 37 s = 35 s = 37 s = 31 s = 37 s = 35 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 41 s = 35 s = 41 s = 39 s = 41 s = 35 s = 41 s = 39 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 37 s = 31 s = 37 s = 35 s = 37 s = 31 s = 37 s = 35 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 37 s = 31 s = 37 s = 35 s = 37 s = 31 s = 37 s = 35 s = 29 s = 23 s = 29 s = 27 s = 27 s = 21 s = 27 s = 25 s = 37 s = 31 s = 37 s = 35 s = 37 s = 31 s = 37 s = 35 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 41 s = 35 s = 41 s = 39 s = 41 s = 35 s = 41 s = 39 s = 33 s = 27 s = 33 s = 31 s = 31 s = 25 s = 31 s = 29 s = 35 s = 29 s = 35 s = 33 s = 35 s = 29 s = 35 s = 33 s = 31 s = 25 s = 31 s = 29 s = 29 s = 23 s = 29 s = 27 s = 35 s = 29 s = 35 s = 33 s = 35 s = 29 s = 35 s = 33 s = 27 s = 21 s = 27 s = 25 s = 25 s = 19 s = 25 s = 23 s = 36 s = 30 s = 36 s = 34 s = 36 s = 30 s = 36 s = 34 s = 32 s = 26 s = 32 s = 30 s = 30 s = 24 s = 30 s = 28 s = 40 s = 34 s = 40 s = 38 s = 40 s = 34 s = 40 s = 38 s = 32 s = 26 s = 32 s = 30 s = 30 s = 24 s = 30 s = 28 s = 36 s = 30 s = 36 s = 34 s = 36 s = 30 s = 36 s = 34 s = 32 s = 26 s = 32 s = 30 s = 30 s = 24 s = 30 s = 28 s = 36 s = 30 s = 36 s = 34 s = 36 s = 30 s = 36 s = 34 s = 28 s = 22 s = 28 s = 26 s = 26 s = 20 s = 26 s = 24 s = 36 s = 30 s = 36 s = 34 s = 36 s = 30 s = 36 s = 34 s = 32 s = 26 s = 32 s = 30 s = 30 s = 24 s = 30 s = 28 s = 40 s = 34 s = 40 s = 38 s = 40 s = 34 s = 40 s = 38 s = 32 s = 26 s = 32 s = 30 s = 30 s = 24 s = 30 s = 28 s = 34 s = 28 s = 34 s = 32 s = 34 s = 28 s = 34 s = 32 s = 30 s = 24 s = 30 s = 28 s = 28 s = 22 s = 28 s = 26 s = 34 s = 28 s = 34 s = 32 s = 34 s = 28 s = 34 s = 32 s = 26 s = 20 s = 26 s = 24 s = 24 s = 18 s = 24 s = 22 s = 30 s = 24 s = 30 s = 28 s = 30 s = 24 s = 30 s = 28 s = 26 s = 20 s = 26 s = 24 s = 24 s = 18 s = 24 s = 22 s = 34 s = 28 s = 34 s = 32 s = 34 s = 28 s = 34 s = 32 s = 26 s = 20 s = 26 s = 24 s = 24 s = 18 s = 24 s = 22 s = 30 s = 24 s = 30 s = 28 s = 30 s = 24 s = 30 s = 28 s = 26 s = 20 s = 26 s = 24 s = 24 s = 18 s = 24 s = 22 s = 30 s = 24 s = 30 s = 28 s = 30 s = 24 s = 30 s = 28 s = 22 s = 16 s = 22 s = 20 s = 20 s = ...

2   Pass
list = [0 8 4 8 2 0 8 0 5 7 7 2 1 6 2 6 2 7 0 2]; y_correct = [0 1 0 1 1 1 1 0 1 1]; assert(isequal(findBestDominoeOrientation(list),y_correct))

s = 39 sbest = 39 s = 37 sbest = 37 s = 31 sbest = 31 s = 29 sbest = 29 s = 31 s = 29 s = 31 s = 29 s = 39 s = 37 s = 31 s = 29 s = 39 s = 37 s = 39 s = 37 s = 49 s = 47 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 33 s = 31 s = 41 s = 39 s = 41 s = 39 s = 43 s = 41 s = 35 s = 33 s = 35 s = 33 s = 35 s = 33 s = 43 s = 41 s = 35 s = 33 s = 43 s = 41 s = 43 s = 41 s = 49 s = 47 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 33 s = 31 s = 41 s = 39 s = 41 s = 39 s = 29 s = 27 sbest = 27 s = 21 sbest = 21 s = 19 sbest = 19 s = 21 s = 19 s = 21 s = 19 s = 29 s = 27 s = 21 s = 19 s = 29 s = 27 s = 29 s = 27 s = 39 s = 37 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 23 s = 21 s = 31 s = 29 s = 31 s = 29 s = 29 s = 27 s = 21 s = 19 s = 21 s = 19 s = 21 s = 19 s = 29 s = 27 s = 21 s = 19 s = 29 s = 27 s = 29 s = 27 s = 35 s = 33 s = 27 s = 25 s = 27 s = 25 s = 27 s = 25 s = 27 s = 25 s = 19 s = 17 sbest = 17 s = 27 s = 25 s = 27 s = 25 s = 39 s = 37 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 39 s = 37 s = 31 s = 29 s = 39 s = 37 s = 39 s = 37 s = 49 s = 47 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 33 s = 31 s = 41 s = 39 s = 41 s = 39 s = 43 s = 41 s = 35 s = 33 s = 35 s = 33 s = 35 s = 33 s = 43 s = 41 s = 35 s = 33 s = 43 s = 41 s = 43 s = 41 s = 49 s = 47 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 33 s = 31 s = 41 s = 39 s = 41 s = 39 s = 33 s = 31 s = 25 s = 23 s = 25 s = 23 s = 25 s = 23 s = 33 s = 31 s = 25 s = 23 s = 33 s = 31 s = 33 s = 31 s = 43 s = 41 s = 35 s = 33 s = 35 s = 33 s = 35 s = 33 s = 35 s = 33 s = 27 s = 25 s = 35 s = 33 s = 35 s = 33 s = 33 s = 31 s = 25 s = 23 s = 25 s = 23 s = 25 s = 23 s = 33 s = 31 s = 25 s = 23 s = 33 s = 31 s = 33 s = 31 s = 39 s = 37 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 23 s = 21 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 23 s = 21 s = 23 s = 21 s = 23 s = 21 s = 31 s = 29 s = 23 s = 21 s = 31 s = 29 s = 31 s = 29 s = 41 s = 39 s = 33 s = 31 s = 33 s = 31 s = 33 s = 31 s = 33 s = 31 s = 25 s = 23 s = 33 s = 31 s = 33 s = 31 s = 35 s = 33 s = 27 s = 25 s = 27 s = 25 s = 27 s = 25 s = 35 s = 33 s = 27 s = 25 s = 35 s = 33 s = 35 s = 33 s = 41 s = 39 s = 33 s = 31 s = 33 s = 31 s = 33 s = 31 s = 33 s = 31 s = 25 s = 23 s = 33 s = 31 s = 33 s = 31 s = 21 s = 19 s = 13 sbest = 13 s = 11 sbest = 11 s = 13 s = 11 s = 13 s = 11 s = 21 s = 19 s = 13 s = 11 s = 21 s = 19 s = 21 s = 19 s = 31 s = 29 s = 23 s = 21 s = 23 s = 21 s = 23 s = 21 s = 23 s = 21 s = 15 s = 13 s = 23 s = 21 s = 23 s = 21 s = 21 s = 19 s = 13 s = 11 s = 13 s = 11 s = 13 s = 11 s = 21 s = 19 s = 13 s = 11 s = 21 s = 19 s = 21 s = 19 s = 27 s = 25 s = 19 s = 17 s = 19 s = 17 s = 19 s = 17 s = 19 s = 17 s = 11 s = 9 sbest = 9 s = 19 s = 17 s = 19 s = 17 s = 31 s = 29 s = 23 s = 21 s = 23 s = 21 s = 23 s = 21 s = 31 s = 29 s = 23 s = 21 s = 31 s = 29 s = 31 s = 29 s = 41 s = 39 s = 33 s = 31 s = 33 s = 31 s = 33 s = 31 s = 33 s = 31 s = 25 s = 23 s = 33 s = 31 s = 33 s = 31 s = 35 s = 33 s = 27 s = 25 s = 27 s = 25 s = 27 s = 25 s = 35 s = 33 s = 27 s = 25 s = 35 s = 33 s = 35 s = 33 s = 41 s = 39 s = 33 s = 31 s = 33 s = 31 s = 33 s = 31 s = 33 s = 31 s = 25 s = 23 s = 33 s = 31 s = 33 s = 31 s = 25 s = 23 s = 17 s = 15 s = 17 s = 15 s = 17 s = 15 s = 25 s = 23 s = 17 s = 15 s = 25 s = 23 s = 25 s = 23 s = 35 s = 33 s = 27 s = 25 s = 27 s = 25 s = 27 s = 25 s = 27 s = 25 s = 19 s = 17 s = 27 s = 25 s = 27 s = 25 s = 25 s = 23 s = 17 s = 15 s = 17 s = 15 s = 17 s = 15 s = 25 s = 23 s = 17 s = 15 s = 25 s = 23 s = 25 s = 23 s = 31 s = 29 s = 23 s = 21 s = 23 s = 21 s = 23 s = 21 s = 23 s = 21 s = 15 s = 13 s = 23 s = 21 s = 23 s = 21 s = 39 s = 37 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 39 s = 37 s = 31 s = 29 s = 39 s = 37 s = 39 s = 37 s = 49 s = 47 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 33 s = 31 s = 41 s = 39 s = 41 s = 39 s = 43 s = 41 s = 35 s = 33 s = 35 s = 33 s = 35 s = 33 s = 43 s = 41 s = 35 s = 33 s = 43 s = 41 s = 43 s = 41 s = 49 s = 47 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 33 s = 31 s = 41 s = 39 s = 41 s = 39 s = 29 s = 27 s = 21 s = 19 s = 21 s = 19 s = 21 s = 19 s = 29 s = 27 s = 21 s = 19 s = 29 s = 27 s = 29 s = 27 s = 39 s = 37 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 23 s = 21 s = 31 s = 29 s = 31 s = 29 s = 29 s = 27 s = 21 s = 19 s = 21 s = 19 s = 21 s = 19 s = 29 s = 27 s = 21 s = 19 s = 29 s = 27 s = 29 s = 27 s = 35 s = 33 s = 27 s = 25 s = 27 s = 25 s = 27 s = 25 s = 27 s = 25 s = 19 s = 17 s = 27 s = 25 s = 27 s = 25 s = 39 s = 37 s = 31 s = 29 s = 31 s = 29 s = 31 s = 29 s = 39 s = 37 s = 31 s = 29 s = 39 s = 37 s = 39 s = 37 s = 49 s = 47 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 33 s = 31 s = 41 s = 39 s = 41 s = 39 s = 43 s = 41 s = 35 s = 33 s = 35 s = 33 s = 35 s = 33 s = 43 s = 41 s = 35 s = 33 s = 43 s = 41 s = 43 s = 41 s = 49 s = 47 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 41 s = 39 s = 33 s = 31 s ...

3   Pass
list = [7 5 3 1 5 1 6 5 4 8 2 6 5 1 1 3 5 9 9 2 0 7 1 7]; y_correct = [0 0 1 1 1 0 0 0 0 0 0 1]; assert(isequal(findBestDominoeOrientation(list),y_correct))

s = 29 sbest = 29 s = 23 sbest = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 33 s = 27 s = 31 s = 37 s = 47 s = 41 s = 35 s = 41 s = 41 s = 35 s = 39 s = 45 s = 47 s = 41 s = 35 s = 41 s = 37 s = 31 s = 35 s = 41 s = 51 s = 45 s = 39 s = 45 s = 45 s = 39 s = 43 s = 49 s = 51 s = 45 s = 39 s = 45 s = 37 s = 31 s = 35 s = 41 s = 51 s = 45 s = 39 s = 45 s = 45 s = 39 s = 43 s = 49 s = 51 s = 45 s = 39 s = 45 s = 27 s = 21 sbest = 21 s = 25 s = 31 s = 41 s = 35 s = 29 s = 35 s = 35 s = 29 s = 33 s = 39 s = 41 s = 35 s = 29 s = 35 s = 31 s = 25 s = 29 s = 35 s = 45 s = 39 s = 33 s = 39 s = 39 s = 33 s = 37 s = 43 s = 45 s = 39 s = 33 s = 39 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 27 s = 21 s = 25 s = 31 s = 41 s = 35 s = 29 s = 35 s = 35 s = 29 s = 33 s = 39 s = 41 s = 35 s = 29 s = 35 s = 31 s = 25 s = 29 s = 35 s = 45 s = 39 s = 33 s = 39 s = 39 s = 33 s = 37 s = 43 s = 45 s = 39 s = 33 s = 39 s = 35 s = 29 s = 33 s = 39 s = 49 s = 43 s = 37 s = 43 s = 43 s = 37 s = 41 s = 47 s = 49 s = 43 s = 37 s = 43 s = 35 s = 29 s = 33 s = 39 s = 49 s = 43 s = 37 s = 43 s = 43 s = 37 s = 41 s = 47 s = 49 s = 43 s = 37 s = 43 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 33 s = 27 s = 31 s = 37 s = 47 s = 41 s = 35 s = 41 s = 41 s = 35 s = 39 s = 45 s = 47 s = 41 s = 35 s = 41 s = 31 s = 25 s = 29 s = 35 s = 45 s = 39 s = 33 s = 39 s = 39 s = 33 s = 37 s = 43 s = 45 s = 39 s = 33 s = 39 s = 31 s = 25 s = 29 s = 35 s = 45 s = 39 s = 33 s = 39 s = 39 s = 33 s = 37 s = 43 s = 45 s = 39 s = 33 s = 39 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 33 s = 27 s = 31 s = 37 s = 47 s = 41 s = 35 s = 41 s = 41 s = 35 s = 39 s = 45 s = 47 s = 41 s = 35 s = 41 s = 37 s = 31 s = 35 s = 41 s = 51 s = 45 s = 39 s = 45 s = 45 s = 39 s = 43 s = 49 s = 51 s = 45 s = 39 s = 45 s = 37 s = 31 s = 35 s = 41 s = 51 s = 45 s = 39 s = 45 s = 45 s = 39 s = 43 s = 49 s = 51 s = 45 s = 39 s = 45 s = 27 s = 21 s = 25 s = 31 s = 41 s = 35 s = 29 s = 35 s = 35 s = 29 s = 33 s = 39 s = 41 s = 35 s = 29 s = 35 s = 31 s = 25 s = 29 s = 35 s = 45 s = 39 s = 33 s = 39 s = 39 s = 33 s = 37 s = 43 s = 45 s = 39 s = 33 s = 39 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 25 s = 19 sbest = 19 s = 23 s = 29 s = 39 s = 33 s = 27 s = 33 s = 33 s = 27 s = 31 s = 37 s = 39 s = 33 s = 27 s = 33 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 33 s = 27 s = 31 s = 37 s = 47 s = 41 s = 35 s = 41 s = 41 s = 35 s = 39 s = 45 s = 47 s = 41 s = 35 s = 41 s = 33 s = 27 s = 31 s = 37 s = 47 s = 41 s = 35 s = 41 s = 41 s = 35 s = 39 s = 45 s = 47 s = 41 s = 35 s = 41 s = 27 s = 21 s = 25 s = 31 s = 41 s = 35 s = 29 s = 35 s = 35 s = 29 s = 33 s = 39 s = 41 s = 35 s = 29 s = 35 s = 31 s = 25 s = 29 s = 35 s = 45 s = 39 s = 33 s = 39 s = 39 s = 33 s = 37 s = 43 s = 45 s = 39 s = 33 s = 39 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 21 s = 15 sbest = 15 s = 19 s = 25 s = 35 s = 29 s = 23 s = 29 s = 29 s = 23 s = 27 s = 33 s = 35 s = 29 s = 23 s = 29 s = 25 s = 19 s = 23 s = 29 s = 39 s = 33 s = 27 s = 33 s = 33 s = 27 s = 31 s = 37 s = 39 s = 33 s = 27 s = 33 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 29 s = 23 s = 27 s = 33 s = 43 s = 37 s = 31 s = 37 s = 37 s = 31 s = 35 s = 41 s = 43 s = 37 s = 31 s = 37 s = 19 s = 13 sbest = 13 s = 17 s = 23 s = 33 s = 27 s = 21 s = 27 s = 27 s = 21 s = 25 s = 31 s = 33 s = 27 s = 21 s = 27 s = 23 s = 17 s = 21 s = 27 s = 37 s = 31 s = 25 s = 31 s = 31 s = 25 s = 29 s = 35 s = 37 s = 31 s = 25 s = 31 s = 21 s = 15 s = 19 s = 25 s = 35 s = 29 s = 23 s = 29 s = 29 s = 23 s = 27 s = 33 s = 35 s = 29 s = 23 s = 29 s = 21 s = 15 s = 19 s = 25 s = 35 s = 29 s = 23 s = 29 s = 29 s = 23 s = 27 s = 33 s = 35 s = 29 s = 23 s = 29 s = 19 s = 13 s = 17 s = 23 s = 33 s = 27 s = 21 s = 27 s = 27 s = 21 s = 25 s = 31 s = 33 s = 27 s = 21 s = 27 s = 23 s = 17 s = 21 s = 27 s = 37 s = 31 s = 25 s = 31 s = 31 s = 25 s = 29 s = 35 s = 37 s = 31 s = 25 s = 31 s = 27 s = 21 s = 25 s = 31 s = 41 s = 35 s = 29 s = 35 s = 35 s = 29 s = 33 s = 39 s = 41 s = 35 s = 29 s = 35 s = 27 s = 21 s = 25 s = 31 s = 41 s = 35 s = 29 s = 35 s = 35 s = 29 s = 33 s = 39 s = 41 s = 35 s = 29 s = 35 s = 21 s = 15 s = ...

4   Pass
list = [0 4 0 3 8 2 2 5]; y_correct = [1 0 1 1]; assert(isequal(findBestDominoeOrientation(list),y_correct))

s = 9 sbest = 9 s = 12 s = 11 s = 8 sbest = 8 s = 9 s = 12 s = 9 s = 6 sbest = 6 s = 5 sbest = 5 s = 8 s = 7 s = 4 sbest = 4 s = 11 s = 14 s = 11 s = 8

### Community Treasure Hunt

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

Start Hunting!