Smallest larger number that shares no digit with n

0
Remix

Given a positive integer n, return the smallest integer greater than n that contains none of the digits that appear in n, or -1 if there is none. Build the answer digit by digit rather than counting upward.

ElevenLabsOnline assessmentLast asked Sep 2026
No answer yet. Write the first one; the best answer gets endorsed.