Pergunta de entrevista da empresa Amazon Lab126

I was asked a question about finding the longest palendrome in a string. I discovered a naive algorithm relatively quickly, and then was asked to handle all corner cases. Took about 10 minutes.

Resposta da entrevista

Sigiloso

9 de mai. de 2014

It's fairly complex; you would start from center characters and expand to the left and right, looking for palendromatic substrings a character at a time. Worst case complexity is n^2.

5