class Solution {
public:
string rightShift(string input, int n) {
// write your solution here
string res = input;
for (size_t i = 0; i < res.size(); i++)
res[i] = 'a' + (res[i] - 'a' + n) % 26;
return res;
}
};
The problem is unclear.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.