← Deutsche Bank questions
CodingReported in a candidate post, Jul 2025

Lexicographically smallest string of length n with sum k

Filed under Deutsche Bank

Given integers n and k, return the lexicographically smallest string of length n made of lowercase letters whose values (a=1, b=2, ..., z=26) sum to exactly k.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Deutsche Bank questions

Collected from public candidate posts and coding forums. Updated Nov 2026.