Abhi and His friend

2.8

5 votes
Easy
Problem

Abhi and Shreya are best friends. Shreya asks abhi to come to Delhi but abhi is busy in Coding so he can't go.In the mean time, abhi got Stuck on a problem and he needs your help. The problem asks for the minimum number of edits (in letters) required to make a given string palindrome.It also asks to print the lexicographically Smallest String after required edits.

Input:

You are given a string consisting of lowercase letters.

Output:

The output will consist of two lines.The first line will have a minimum number of edits required and the second line will contain output String asked in the Problem.

Constraints:

1<=|string_ length|<=100000

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

here 's' is replaced by 'i' , 'e' and 'k' are replaced by 'b' and 'a' respectively to make it a palindrome.

Editor Image

?