Question: Have the function Mathcha Ilenge ( num ) take the num parameter being passed and return the next number greater than nus using the same

Have the function Mathcha Ilenge (num) take the num parameter being passed and return the next number greater than nus using the same digits. For example: if num is 123 retum 132, if it's 12453 return 12534. If a number has no greater permutations, retum -1(ie.999).
Once your function is working, take the final output string and replace all characters that appear in your chal lengeroken with [CHAR]-
Your challengetoken: mh64cnexs
?
Examples
Input: 11121
Output: 11211
Final Output: 11211
Input: 41352
Output, 41523
Elad outhut
 Have the function Mathcha Ilenge (num) take the num parameter being

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!