← Swiggy questions
CodingReported in a candidate post, Sep 2022

All greater numbers formed from the digits of a number

Filed under Swiggy

Given a positive integer n, return all numbers that can be formed by rearranging the digits of n and that are strictly greater than n, in increasing order. For 213 the answer is 231, 312, 321.

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

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