Creates palindrome numbers with first half as i . Value of j decides whether we need an odd length or even length palindrome .
int i = 1 ; while ( ( number = createPalindrome ( i ++ , j ) ) <= N ) palindromes . push_back ( number ) ; } return palindromes ; }