Practice Find Palindrome With Fixed Length
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given an integer array queries and a positive integer intLength, return an array answer where answer[i] is either the queries[i]th smallest positive palindrome of length intLength or -1 if no such palindrome exists. A palindrome is a number that reads the same backwards and forwards. Palindromes cannot have leading zeros.
Source: Find Palindrome With Fixed Length on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
queries = [1,2,3,4,5,90], intLength = 3
[101,111,121,131,141,999]
# Example 2
queries = [2,4,6], intLength = 4
[1111,1331,1551]
Constraints
Related LeetCode Problems
Practice more problems similar to Find Palindrome With Fixed Length.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.