Amazon Interview Question

Write a function in java to calculate all the possible palindromes in a string.

Interview Answers

Anonymous

Feb 1, 2012

Simple calculate all the possible substrings, and write a helper method to check if each substring is a palindrome.

1

Anonymous

Feb 4, 2012

Please see the link here . It has the explanation and code for the problem http://www.nobrainer.co.cc/2012/02/find-all-palindromes-in-given-string.html

1