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.

Practice More Questions

1 answer published. Last candidate submission on Jun 11 2026, 5:36am PDT. Interview question asked to Software Engineers interviewing at Hippo, Procore Technologies, Careof and other companies. Original question asked: Palindromes in Base-10 and Base-k. Question last reported by a candidate interviewing at Lucid Motors for a Software Engineer interview on Jul 29 2026, 2:17am PDT.