Amazon interview question

Write program for bubblesort and how to identify a palindrome?