Cody

Solution 1440179

Submitted on 13 Feb 2018 by GEORGIOS BEKAS
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
x = 'purusa'; y_correct = 'u'; assert(isequal(frequent_character(x),y_correct))

x1 = 'aprsu' y1 = [] y1 = 1 y1 = 1 1 y1 = 1 1 1 y1 = 1 1 1 1 y1 = 1 1 1 1 2 row = 1 col = 5 y = 'u'

2   Pass
x = 'rama'; y_correct = 'a'; assert(isequal(frequent_character(x),y_correct))

x1 = 'amr' y1 = [] y1 = 2 y1 = 2 1 y1 = 2 1 1 row = 1 col = 1 y = 'a'

3   Pass
x = 'extemporaneous'; y_correct = 'e'; assert(isequal(frequent_character(x),y_correct))

x1 = 'aemnoprstux' y1 = [] y1 = 1 y1 = 1 3 y1 = 1 3 1 y1 = 1 3 1 1 y1 = 1 3 1 1 2 y1 = 1 3 1 1 2 1 y1 = 1 3 1 1 2 1 1 y1 = 1 3 1 1 2 1 1 1 y1 = 1 3 1 1 2 1 1 1 1 y1 = 1 3 1 1 2 1 1 1 1 1 y1 = 1 3 1 1 2 1 1 1 1 1 1 row = 1 col = 2 y = 'e'

4   Pass
x = 'Thisisasentencewrittenasalongwordwithnospaces.'; y_correct = 's'; assert(isequal(frequent_character(x),y_correct))

x1 = '.Tacdeghilnoprstw' y1 = [] y1 = 1 y1 = 1 1 y1 = 1 1 4 y1 = 1 1 4 2 y1 = 1 1 4 2 1 y1 = 1 1 4 2 1 5 y1 = 1 1 4 2 1 5 1 y1 = 1 1 4 2 1 5 1 2 y1 = 1 1 4 2 1 5 1 2 4 y1 = 1 1 4 2 1 5 1 2 4 1 y1 = 1 1 4 2 1 5 1 2 4 1 5 y1 = 1 1 4 2 1 5 1 2 4 1 5 3 y1 = 1 1 4 2 1 5 1 2 4 1 5 3 1 y1 = 1 1 4 2 1 5 1 2 4 1 5 3 1 2 y1 = 1 1 4 2 1 5 1 2 4 1 5 3 1 2 6 y1 = 1 1 4 2 1 5 1 2 4 1 5 3 1 2 6 4 y1 = 1 1 4 2 1 5 1 2 4 1 5 3 1 2 6 4 3 row = 1 col = 15 y = 's'

5   Pass
x = 'Jabberwocky'; y_correct = 'b'; assert(isequal(frequent_character(x),y_correct))

x1 = 'Jabcekorwy' y1 = [] y1 = 1 y1 = 1 1 y1 = 1 1 2 y1 = 1 1 2 1 y1 = 1 1 2 1 1 y1 = 1 1 2 1 1 1 y1 = 1 1 2 1 1 1 1 y1 = 1 1 2 1 1 1 1 1 y1 = 1 1 2 1 1 1 1 1 1 y1 = 1 1 2 1 1 1 1 1 1 1 row = 1 col = 3 y = 'b'

6   Pass
x = 'inimical'; y_correct = 'i'; assert(isequal(frequent_character(x),y_correct))

x1 = 'acilmn' y1 = [] y1 = 1 y1 = 1 1 y1 = 1 1 3 y1 = 1 1 3 1 y1 = 1 1 3 1 1 y1 = 1 1 3 1 1 1 row = 1 col = 3 y = 'i'

7   Pass
x = 'nine-million'; y_correct = 'i'; assert(isequal(frequent_character(x),y_correct))

x1 = '-eilmno' y1 = [] y1 = 1 y1 = 1 1 y1 = 1 1 3 y1 = 1 1 3 2 y1 = 1 1 3 2 1 y1 = 1 1 3 2 1 3 y1 = 1 1 3 2 1 3 1 row = 1 1 col = 3 6 y = 'i'