Form The Largest (retired)
Description:
Task
Given a number , Return _The Maximum number _ could be formed from the digits of the number given .
Notes
Only Natural numbers passed to the function , numbers Contain digits [0:9] inclusive
Digit Duplications could occur , So also consider it when forming the Largest
Input >> Output Examples:
maxNumber (213) ==> return (321)
Explanation:
As 321
is _The Maximum number _ could be formed from the digits of the number 213 .
maxNumber (7389) ==> return (9873)
Explanation:
As 9873
is _The Maximum number _ could be formed from the digits of the number 7389 .
maxNumber (63729) ==> return (97632)
Explanation:
As 97632
is _The Maximum number _ could be formed from the digits of the number 63729 .
maxNumber (566797) ==> return (977665)
Explanation:
As 977665
is _The Maximum number _ could be formed from the digits of the number 566797 .
Note : Digit duplications are considered when forming the largest .
maxNumber (17693284) ==> return (98764321)
Explanation:
As 98764321
is _The Maximum number _ could be formed from the digits of the number 17693284 .
Playing with Numbers Series
Playing With Lists/Arrays Series
For More Enjoyable Katas
ALL translations are welcomed
Enjoy Learning !!
Zizou
Similar Kata:
Stats:
Created | Jan 4, 2018 |
Warriors Trained | 14775 |
Total Skips | 929 |
Total Code Submissions | 27817 |
Total Times Completed | 8404 |
C++ Completions | 528 |
JavaScript Completions | 2725 |
Crystal Completions | 10 |
Ruby Completions | 492 |
Python Completions | 2160 |
C# Completions | 434 |
Java Completions | 1109 |
C Completions | 179 |
Rust Completions | 298 |
Haskell Completions | 88 |
TypeScript Completions | 141 |
PHP Completions | 241 |
Dart Completions | 202 |
Julia Completions | 24 |
CoffeeScript Completions | 7 |
Prolog Completions | 17 |
Clojure Completions | 17 |
Total Stars | 104 |
% of votes with a positive feedback rating | 92% of 1187 |
Total "Very Satisfied" Votes | 1021 |
Total "Somewhat Satisfied" Votes | 150 |
Total "Not Satisfied" Votes | 16 |
Total Rank Assessments | 48 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |