Wikipedia: A palindrome is a word, phrase, number or other sequence of units that can be read the same way in either direction (the adjustment of punctuation and spaces between words is generally permitted).
First, we need to define the minimum length to qualify as a palindrome. We’ll call this minLength.
- First filter non-letters and convert everything to upper case.
- Create an array of characters.
- Walk all possible strings of sufficient length and determine it they are matches.
- We avoid using string function to obtain good performance and small memory size.
- No recursions or functions calls
The unit test is simple and uses one known palindrome and random letters.
The test run allows us to confirm correct operation.