Pregunta de entrevista de Amazon

Greedy algorithm and the Palindrome sequence