← Questions

Smallest larger number that shares no digit with n

0
ElevenLabsCodingLast asked Oct 2026

A coding interview question asked in ElevenLabs's online assessment, last asked Oct 2026. It tests greedy and math.

Given a positive integer n, return the smallest integer strictly greater than n that contains none of the decimal digits appearing in n, or -1 if there is none. The answer may repeat a digit and may have more digits than n, but no leading…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

greedy · math

Your code and the AI tutor open when you unlock this question.