Cody

Solution 1222907

Submitted on 30 Jun 2017 by Anoop Varghese
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
str = 'a'; score = 1; assert(isequal(scrabble_score(str),score))

r = 1 c = 3 score = 1

2   Pass
str = 'matlab'; score = 10; assert(isequal(scrabble_score(str),score))

r = 3 c = 4 score = 3 r = 1 c = 3 score = 4 r = 1 c = 8 score = 5 r = 1 c = 9 score = 6 r = 1 c = 3 score = 7 r = 3 c = 2 score = 10

3   Pass
str = 'quetzalcoatl'; score = 32; assert(isequal(scrabble_score(str),score))

r = 7 c = 2 score = 10 r = 1 c = 11 score = 11 r = 1 c = 2 score = 12 r = 1 c = 8 score = 13 r = 7 c = 3 score = 23 r = 1 c = 3 score = 24 r = 1 c = 9 score = 25 r = 3 c = 3 score = 28 r = 1 c = 5 score = 29 r = 1 c = 3 score = 30 r = 1 c = 8 score = 31 r = 1 c = 9 score = 32

4   Pass
str = 'quartz'; score = 24; assert(isequal(scrabble_score(str),score))

r = 7 c = 2 score = 10 r = 1 c = 11 score = 11 r = 1 c = 3 score = 12 r = 1 c = 7 score = 13 r = 1 c = 8 score = 14 r = 7 c = 3 score = 24

5   Pass
str = 'jackal'; score = 19; assert(isequal(scrabble_score(str),score))

r = 6 c = 2 score = 8 r = 1 c = 3 score = 9 r = 3 c = 3 score = 12 r = 5 c = 2 score = 17 r = 1 c = 3 score = 18 r = 1 c = 9 score = 19