Cody

Solution 1236485

Submitted on 21 Jul 2017 by Rafael Hernandez-Walls
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 = 'MNOP'; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

b = 'M' k = 1 b = 'MN' k = 2 b = 'MNO' k = 3 b = 'MNOP' k = 4

2   Pass
x = 'MN0P'; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

b = 'M' k = 1 b = 'MN' k = 2 b = 'MNP' k = 4

3   Pass
x = 'INOUT1NOUT'; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

b = 'I' k = 1 b = 'IN' k = 2 b = 'INO' k = 3 b = 'INOU' k = 4 b = 'INOUT' k = 5 b = 'INOUTN' k = 7 b = 'INOUTNO' k = 8 b = 'INOUTNOU' k = 9 b = 'INOUTNOUT' k = 10

4   Pass
x = 'UPANDDOWN'; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

b = 'U' k = 1 b = 'UP' k = 2 b = 'UPA' k = 3 b = 'UPAN' k = 4 b = 'UPAND' k = 5 b = 'UPANDD' k = 6 b = 'UPANDDO' k = 7 b = 'UPANDDOW' k = 8 b = 'UPANDDOWN' k = 9

5   Pass
x = 'RUaMATLABPRO'; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

b = 'R' k = 1 b = 'RU' k = 2 b = 'RUM' k = 4 b = 'RUMA' k = 5 b = 'RUMAT' k = 6 b = 'RUMATL' k = 7 b = 'RUMATLA' k = 8 b = 'RUMATLAB' k = 9 b = 'RUMATLABP' k = 10 b = 'RUMATLABPR' k = 11 b = 'RUMATLABPRO' k = 12

Suggested Problems

More from this Author100