User experience developer interview questions shared by candidates
Write a function that returns true if the input is a palindrome.
I found this question to be very interesting. I did answer it correctly, but it definitely got me thinking.
This is a typical question. Treat the input string as an char array. Traverse the array and compare with the char [indexes] in a loop like this: len = inputstring.length(); (for i=0; i
Anonymous, is good your answer, but in the code you must to fix convert if (inputstring[i] != inputstring[len-i] into if (inputstring[i] != inputstring[len-i-1] because i starts with 0, not 1.
See Interview Questions for Similar Jobs
- Sales Associate
- Human Resource
- Social Worker
- Account Executive
- Dental Assistant
- Security Guard
- Truck Driver