Cody

Solution 580823

Submitted on 12 Feb 2015 by Riyasat
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
%% inStr = 'doug'; shift = 10; outStr = 'nyeq'; assert(isequal(cypher(inStr, shift),outStr))

A = 100 111 117 103 f = 1 idx = 3 A = 110 121 101 113

2   Pass
%% inStr = 'thequickbrownfox'; shift = 5; outStr = 'ymjvznhpgwtbsktc'; assert(isequal(cypher(inStr, shift),outStr))

A = 116 104 101 113 117 105 99 107 98 114 111 119 110 102 111 120 f = 1 1 idx = 12 16 A = 121 109 106 118 122 110 104 112 103 119 116 98 115 107 116 99

3   Pass
%% inStr = 'thecrowfliesatmidnight'; shift = 22; outStr = 'pdaynksbheaowpiezjecdp'; assert(isequal(cypher(inStr, shift),outStr))

A = Columns 1 through 16 116 104 101 99 114 111 119 102 108 105 101 115 97 116 109 105 Columns 17 through 22 100 110 105 103 104 116 f = Columns 1 through 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 17 through 19 1 1 1 idx = Columns 1 through 16 1 2 3 5 6 7 8 9 10 11 12 14 15 16 18 19 Columns 17 through 19 20 21 22 A = Columns 1 through 16 112 100 97 121 110 107 115 98 104 101 97 111 119 112 105 101 Columns 17 through 22 122 106 101 99 100 112