Domanda di colloquio di Tata Consultancy Services

Sort the array and interchange the second last and second letter.