+ 14

[ASSIGNMENT] Remove Smallest Digits

Hey, Generate a list of random digits from 0-9 and remove the next smallest digits(s) from the list untill you are left with the largest single digits(s). (As an extra show digits removed from list) Example User Inputs 10 (10 random digits are generated) 1537262627 (1) ->Removed 537262627 (2,2,2)->Removed 537667 (3)->Removed 57667 (5)->Removed 7667 (6,6)->Removed 77 (7,7) -> Largest Digits Thanks 👍

1st May 2018, 7:53 AM
D_Stark
D_Stark - avatar
16 Answers
3rd May 2018, 11:00 AM
🌛DT🌜
🌛DT🌜 - avatar
+ 18
https://code.sololearn.com/cUnkJJ1sRE4f/?ref=app
1st May 2018, 12:54 PM
Tanay
Tanay - avatar
2nd May 2018, 11:13 AM
LukArToDo
LukArToDo - avatar
1st May 2018, 8:30 AM
Louis
Louis - avatar
+ 6
thanks gordie thats very kind ☺👍 i hope that we see more from you becuase your an amazing coder its a shame you may have to leave again hopefully your account stays open 😞
1st May 2018, 11:20 AM
D_Stark
D_Stark - avatar
+ 6
One more Python solution with full consequent print out of removed elements: https://code.sololearn.com/cIGWvK3WGEx3/?ref=app
1st May 2018, 3:03 PM
Nevfy
+ 5
Gordie perfect 👌 glad to see you back buddy 👍☺😉👍
1st May 2018, 10:37 AM
D_Stark
D_Stark - avatar
+ 3
Nice challenge randarr=[] for(var i=0;i<9;i++){ randarr.push(~~(Math.random()*9)); } max=Math.max(...randarr); alert(max)
1st May 2018, 8:04 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 3
https://code.sololearn.com/cwTCc1c5AFNs/#py most useful solution i could've thought of.
1st May 2018, 7:09 PM
Tomer Sim
Tomer Sim - avatar
+ 3
Well give this a try [code to be entered here]
2nd May 2018, 1:57 AM
Rahul George
Rahul George - avatar
+ 2
this was a pain to type, god bless LINQ https://code.sololearn.com/c5sZVoHU7j0Q/?ref=app
1st May 2018, 2:41 PM
hinanawi
hinanawi - avatar
1st May 2018, 4:22 PM
Braut
Braut - avatar
+ 1
https://code.sololearn.com/cN82Y28b1X7i/?ref=app
3rd May 2018, 11:40 AM
Coder++
Coder++ - avatar
0
nurhossain
1st May 2018, 5:42 PM
Nurhossain Mallick
Nurhossain Mallick - avatar