Created
February 2, 2022 22:37
-
-
Save dscataglini/aa338e5a5d515a7d5b267ad1d1594451 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your task is to make a function that can take any non-negative integer as an argument and return it with its digits in descending order. | |
Essentially, rearrange the digits to create the highest possible number. | |
Examples: | |
Input: 42145 Output: 54421 | |
Input: 145263 Output: 654321 | |
Input: 123456789 Output: 987654321 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment