Changing String
CodeChefOpen on judge ↗
Fluffy the squirrel is playing with strings today. Today, he is given a string s consisting of lowercase letters. Every second, he can shift a letter to the left or right. For example, if the current letter is c, then he can change it to b or d in one second. Note that if we shift z to the right it becomes a and similarly a becomes z when shifted to the left. Now, Fluffy has k seconds to spare an
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start