Ocado Group Interview Question

Longest palindrome in a string.

Interview Answers

Anonymous

Mar 29, 2015

Try and construct palindromes starting at each of the 2n-1 'middles'. O(n^2) runtime, they don't expect you to know the O(N) solution for it.

1

Anonymous

Nov 14, 2015

Have a question. Help is appreciated. In this logical pseudolanguage (paperbase test 1) how can we leave the loop if some condition is satisfied?