This program is for Task 1 where the problem statement is given below:
Given a number n, find the smallest number that has the same set of digits as n and is greater than n. If n is the greatest possible number with its set of digits, then print “not possible”.
Input: n = "218765"
Output: "251678"
@chandrikadeb7 I request you to merge this request under HacktoberFest'21. Thanks
This program is for Task 1 where the problem statement is given below: Given a number n, find the smallest number that has the same set of digits as n and is greater than n. If n is the greatest possible number with its set of digits, then print “not possible”. Input: n = "218765" Output: "251678" @chandrikadeb7 I request you to merge this request under HacktoberFest'21. Thanks