Given two integers and , the task is to find the sum of all the palindromic numbers within the range [L, R] which are of odd length.
Input: L = 10, R = 130
101 + 111 + 121 = 333
Input: L = 110, R = 1130
Below is the implementation of the above approach:
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Sum of all palindromic numbers lying in the range [L, R] for Q queries
- Find a range of composite numbers of given length
- Length of longest Palindromic Subsequence of even length with no two adjacent characters same
- Number of ways to obtain each numbers in range [1, b+c] by adding any two numbers in range [a, b] and [b, c]
- Check if all the palindromic sub-strings are of odd length
- Number of palindromic subsequences of length k where k <= 3
- Number of strings of length N with no palindromic sub string
- Count of non-palindromic strings of length M using given N characters
- Count all Prime Length Palindromic Substrings
- Check if an array has some palindromic subsequence of length at least 3
- Count of Palindromic substrings in an Index range
- Count of odd length contiguous Palindromic sequences in a Matrix
- Find Nth even length palindromic number formed using digits X and Y
- Count of unique palindromic strings of length X from given string
- Check if a string can be split into even length palindromic substrings
- Maximum length palindromic substring such that it starts and ends with given char
- Palindromic Selfie Numbers
- Generate all palindromic numbers less than n
- Count of N digit palindromic numbers divisible by 9
- Sum of all N-digit palindromic numbers which doesn't contains 0 and are divisible by 9
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.