Given an integer D, the task is to find all the D-digit palindrome numbers.
Input: D = 1
Output: 1 2 3 4 5 6 7 8 9
Input: D = 2
Output: 11 22 33 44 55 66 77 88 99
Approach: Numbers with D-digits start from 10(D – 1) to 10D – 1. So, start checking every number from this interval whether it is palindrome or not.
Below is the implementation of the above approach:
11 22 33 44 55 66 77 88 99
- Count the number of digits of palindrome numbers in an array
- Find all the prime numbers of given number of digits
- Find the count of numbers that can be formed using digits 3, 4 only and having length at max N.
- Find maximum product of digits among numbers less than or equal to N
- N'th palindrome of K digits
- Check if the sum of digits of N is palindrome
- Smallest and Largest Palindrome with N Digits
- Count of numbers between range having only non-zero digits whose sum of digits is N and number is divisible by M
- Make largest palindrome by changing at most K-digits
- Count numbers in given range such that sum of even digits is greater than sum of odd digits
- Numbers with sum of digits equal to the sum of digits of its all prime factor
- Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B
- Find the average of k digits from the beginning and l digits from the end of the given number
- Sum of first K even-length Palindrome numbers
- Sum of all N digit palindrome numbers
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.