Coding

Palindromes in Base-10 and Base-k

Return the first n integers that are palindromes in both base-10 and base-k.

Input: n = 2, k = 4

Output: [1, 5]

Explanation: 1 is '1' in base 4, and 5 is '11' in base 4. Both are perfect palindromes in decimal and base 4 simultaneously.

Was asked at

Practice this question with AI

First session is free - no credit card required.

Go Premium

More interviews, more skills, more success.

No answers yet

Be the first to share your approach to this question

Practice More Questions

1 answer published. Last candidate submission on Jun 11 2026, 5:36am PDT. Interview question asked to Software Engineers interviewing at Pipedrive, Chewy, Pinterest and other companies. Original question asked: Palindromes in Base-10 and Base-k. Question last reported by a candidate interviewing at Amazon for a Software Engineer interview on Oct 10 2026, 4:56am PDT.