Pergunta de entrevista da empresa MRSOOL

Search in reverse sorted array. Make a string palindrome by adjacent swaps.