The smallest palindrome

Find the smallest palindrome in a given string

A palindrome is a word or a phrase that is the same whether you read it backwards or forwards, for example the word `refer’.

example:

getSmallestPalindrome('the nurses run');
// nurses run


Share Comments