Encode a string using the QWERTY shift code.
This code is where you touch type but are offset by one character to the right.
Only letters are encoded as the top row shifting does not occur.
(eg) "A" becomes "S" and "a" becomes "s"
"PpLlMm" becomes "{[:;<,"
An encoded message will never have any "QqAaZz" letters.
Illegal characters in the original message are "{{:;<,".
Encode "A-Za-z". All other characters are normal except for the Illegal characters.
Input:
str= "You miss"
Output:
encoded_str= "Upi ,odd"
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers257
Suggested Problems
-
Back to basics 22 - Rotate a matrix
942 Solvers
-
Compress strings (not springs)
221 Solvers
-
Number of 1s in a binary string
11735 Solvers
-
346 Solvers
-
Decimation - Optimized for speed
233 Solvers
More from this Author306
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!