Check palindrome number and next palindrome | Microsoft Interview Question