MSG - EDITORIAL

Difficulty: Easy

Pre requisites: String manipulation

Problem link:

Contest problem link

Practice problem link

Problem

Given a string and an integer value, X, perform the following manipulation:
Reverse the string till position X.
Perform Z-transform on each character after the position X.

Explanation

To solve this problem reverse the given string till position X and then perform Z-transform on the rest of the characters.

The problem statement clearly defines Z-transform. If the alphabet, x comes at position i in English alphabet sequence, the Z-transform of x is (26-i+1)th alphabet in the English alphabet sequence.

Problem setter’s solution: SOLUTION