The string up to the point specified in the question , the string remains unchanged and from the point up to the length of the string , we reverse the alphabetical order
for ( int i = n ; i < l ; i ++ ) str [ i ] = reverseAlphabet [ str [ i ] - ' a ' ] ; return str ; }