Tap here to switch tabs
Problem
Submissions

Problem: Find Palindrome With Fixed Length

Try to solve the Find Palindrome With Fixed Length problem.

Statement

Given an integer array queries and an integer intLength, return an array ans where ans[i] is the queries[i]extth^{ ext{th}} smallest positive palindromic integer of length intLength. If no such palindrome exists, set ans[i] to −1-1.

A palindromic number is a positive integer that reads the same backward as forward and does not have leading zeros.

Constraints:

  • 1≤1 \leq queries.length ≤5imes104\leq 5 imes 10^4

  • 1≤1 \leq queries[i] ≤109\leq 10^9

  • 1≤1 \leq intLength ≤15\leq 15

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find Palindrome With Fixed Length

Try to solve the Find Palindrome With Fixed Length problem.

Statement

Given an integer array queries and an integer intLength, return an array ans where ans[i] is the queries[i]extth^{ ext{th}} smallest positive palindromic integer of length intLength. If no such palindrome exists, set ans[i] to −1-1.

A palindromic number is a positive integer that reads the same backward as forward and does not have leading zeros.

Constraints:

  • 1≤1 \leq queries.length ≤5imes104\leq 5 imes 10^4

  • 1≤1 \leq queries[i] ≤109\leq 10^9

  • 1≤1 \leq intLength ≤15\leq 15