+ 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 👍
16 Answers
+ 27
My try in Ruby 👇
https://code.sololearn.com/c8PCAiVTFL4X/?ref=app
My try in php 👇
https://code.sololearn.com/w9uS2igczyfN/?ref=app
+ 18
https://code.sololearn.com/cUnkJJ1sRE4f/?ref=app
+ 6
+ 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 😞
+ 6
One more Python solution with full consequent print out of removed elements:
https://code.sololearn.com/cIGWvK3WGEx3/?ref=app
+ 5
Gordie perfect 👌 glad to see you back buddy 👍☺😉👍
+ 3
Nice challenge
randarr=[]
for(var i=0;i<9;i++){
randarr.push(~~(Math.random()*9));
}
max=Math.max(...randarr);
alert(max)
+ 3
https://code.sololearn.com/cwTCc1c5AFNs/#py
most useful solution i could've thought of.
+ 3
Well give this a try
[code to be entered here]
+ 2
this was a pain to type, god bless LINQ
https://code.sololearn.com/c5sZVoHU7j0Q/?ref=app
+ 2
My try with Ruby:
https://code.sololearn.com/c0P4DTTzDral/?ref=app
+ 1
https://code.sololearn.com/cN82Y28b1X7i/?ref=app
0
nurhossain