← Amazon questions

Next highest number with same digits

Filed under Amazon · Also reported at Adobe

Given a number represented as a string or integer, rearrange its digits to find the next lexicographically greater permutation. If such arrangement is not possible, return the smallest possible…

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 Amazon questions

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