How to get next greater number with same set of digits | C program

Опубликовано: 16 Октябрь 2024
на канале: SkillUp with Genie
1,087
22

Given a number n, find the smallest number that has 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”.
For example if the number is 132465, next greater number is 132546.

Algorithm is explained step by step followed by logic in C program

🎁Please subscribe, Like and share the video🎁

C logic program playlist:
   • C Programs  
C pattern program playlist:
   • Sine wave without using Graphics file...  

#SkillUpwithGenie #interviewpreparation #cprogramming
#CodingInterview
#Leetcodesolution
#findnextgreaternumberinC
#softwareinterviewquestion