Unravel Data interview question

java, python - Palindrome etc