Retired

Form The Largest (retired)

528 of 8,404MrZizoScream

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

Fundamentals
Numbers
Data Types
Mathematics
Algorithms
Logic
Basic Language Features
Loops
Control Flow
Conditional Statements

Stats:

CreatedJan 4, 2018
Warriors Trained14775
Total Skips929
Total Code Submissions27817
Total Times Completed8404
C++ Completions528
JavaScript Completions2725
Crystal Completions10
Ruby Completions492
Python Completions2160
C# Completions434
Java Completions1109
C Completions179
Rust Completions298
Haskell Completions88
TypeScript Completions141
PHP Completions241
Dart Completions202
Julia Completions24
CoffeeScript Completions7
Prolog Completions17
Clojure Completions17
Total Stars104
% of votes with a positive feedback rating92% of 1187
Total "Very Satisfied" Votes1021
Total "Somewhat Satisfied" Votes150
Total "Not Satisfied" Votes16
Total Rank Assessments48
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • MrZizoScream Avatar
  • GiacomoSorbi Avatar
  • kazk Avatar
  • B1ts Avatar
  • Jay-9 Avatar
  • Blind4Basics Avatar
  • a.merezhanyi Avatar
  • realfg Avatar
  • clcraig Avatar
  • FArekkusu Avatar
  • user9644768 Avatar
  • cliffstamp Avatar
  • stellartux Avatar
  • user8436785 Avatar
  • qmstuart Avatar
  • ejini战神 Avatar
Ad