Amazon interview question

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

Interview Answers

Anonymous

1 Feb 2012

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

1

Anonymous

4 Feb 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