Amazon Lab126 Interview Question: I was asked a question about ... | Glassdoor

Interview Question

Software Development Test Engineer Interview Sunnyvale, CA

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.

Interview Answer

2 Answers


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.

Interview Candidate on May 9, 2014

This post has been removed.
Please see our Community Guidelines or Terms of Service for more information.

Add Answers or Comments

To comment on this, Sign In or Sign Up.