String Coding Interview Questions

In addition to array and linked list data structures, string is another popular topic on programming job interviews.

The good thing about the string is that if you know the array, you can solve string-based questions pretty easily, because strings are nothing but a character array.

Palindrome check

A palindrome is a string that is the same read forward or backward. For example, “dad” is the same in forward or reverse direction. The code snippet provided here also works for numbers.