Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2217. Find Palindrome With Fixed Length
For each query k, return the k-th smallest positive palindrome with exactly intLength digits (no leading zeros), or -1 if fewer than k palindromes exist. This is solved by enumerating the valid first half (starting from 10^{half-1}) and mirroring it—adjusting for odd/even lengths—and checking if k exceeds the total count.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.