Cody

Solution 1552741

Submitted on 7 Jun 2018
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 = {[1 5; 2 3; 2 2; 3 4; 0 3], [0 4; 1 5; 2 2; 4 5; 4 6], [7 7; 3 8; 4 7; 5 9; 0 4]}; selections = [4 4 4]; assert(isequal(ChooseBestFittingDominoes(list),selections))

list = 1×3 cell array {3×2 double} {3×2 double} {3×2 double} ans = datetime Thursday, June 7, 2018 2:18:23.860 * STACK TRACE: Stack item number 1: ans = struct with fields: file: '/users/mss.system.HKTEH8/submission/ChooseBestFittingDominoes.m' name: 'ChooseBestFittingDominoes' line: 14 Stack item number 2: ans = struct with fields: file: '/users/mss.system.HKTEH8/ScoringEngineSharedVariable1.m' name: 'ScoringEngineSharedVariable1' line: 5 Stack item number 3: ans = struct with fields: file: '/users/mss.system.HKTEH8/solutionTest.m' name: 'solutionTest' line: 3 Stack item number 4: ans = struct with fields: file: '/opt/mlsedu/matlab/R2018a/toolbox/matlab/testframework/unittest/ext/+matlab/+unittest/+internal/executeCodeBlock.m' name: 'executeCodeBlock' line: 11 Stack item number 5: ans = struct with fields: file: '/opt/mlsedu/matlab/R2018a/toolbox/matlab/testframework/unittest/ext/+matlab/+unittest/+internal/ScriptTestCaseProvider.m' name: 'ScriptTestCaseProvider.createSharedVariables' line: 149 ... etc. ~~~~~ list = 1×3 cell array {3×2 double} {3×2 double} {3×2 double} list{1} = 1 3 2 4 5 6

Assertion failed.

2   Fail
list = {[1 4; 2 2; 1 1; 3 3],[1 2; 2 3],[2 2]}; selections = [3 1 1]; assert(isequal(ChooseBestFittingDominoes(list),selections))

list = 1×3 cell array {3×2 double} {3×2 double} {3×2 double} ans = datetime Thursday, June 7, 2018 2:18:23.860 * STACK TRACE: Stack item number 1: ans = struct with fields: file: '/users/mss.system.HKTEH8/submission/ChooseBestFittingDominoes.m' name: 'ChooseBestFittingDominoes' line: 14 Stack item number 2: ans = struct with fields: file: '/users/mss.system.HKTEH8/ScoringEngineSharedVariable1.m' name: 'ScoringEngineSharedVariable1' line: 5 Stack item number 3: ans = struct with fields: file: '/users/mss.system.HKTEH8/solutionTest.m' name: 'solutionTest' line: 3 Stack item number 4: ans = struct with fields: file: '/opt/mlsedu/matlab/R2018a/toolbox/matlab/testframework/unittest/ext/+matlab/+unittest/+internal/executeCodeBlock.m' name: 'executeCodeBlock' line: 11 Stack item number 5: ans = struct with fields: file: '/opt/mlsedu/matlab/R2018a/toolbox/matlab/testframework/unittest/ext/+matlab/+unittest/+internal/ScriptTestCaseProvider.m' name: 'ScriptTestCaseProvider.createSharedVariables' line: 149 ... etc. ~~~~~ list = 1×3 cell array {3×2 double} {3×2 double} {3×2 double} list{1} = 1 3 2 4 5 6

Assertion failed.