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 . Add ( number ) ; } } return palindromes ; } static String reverse ( String input ) { char [ ] temparray = input . ToCharArray ( ) ; int left , right = 0 ; right = temparray . Length - 1 ; for ( left = 0 ; left < right ; left ++ , right -- ) {