Find next and closest palindromes | Uber Interview Question