AptAmigo interview question

Algorithm: Palindrome , sorting, and substrings