← Goldman Sachs questions

Next greater number with same set of digits

Filed under Goldman Sachs

Given a positive integer N, find the smallest integer greater than N that can be formed by rearranging the digits of N. If no such integer exists (i.e., the digits are in non-increasing order), return…

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 Goldman Sachs questions

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