PayPal Interview Question

Write a program to check if a string is palindrome or not explain the approach?