General Motors (GM) Interview Question

Explain the code you would develop to determine whether or not a word is a palindrome

Interview Answer

Anonymous

Jun 23, 2016

Write loop to get each character in reverse and store them in a String variable, reverse may be. Now you can compare original word with variable reverse - original.equals(reverse), if true, it's a palindrome