+ 1
Return Largest possible number from a list of non-negative integers.
Write a function that takes a list of non-negative integers, sorts them so that they make up the largest possible number. For example, [50, 2, 1, 9], the largest generated number is 95021, or [9, 988, 9, 9] => 999988. Task from https://proglib.io/p/5-problems-for-software-engineer/
6 Answers
+ 2
my one, tested with 5,51,516
https://code.sololearn.com/W12S8c8hCH97/?ref=app
note: past challenges help to new challenges :)
+ 1
heres mine.....
https://code.sololearn.com/c7Rr0NcYV1k4/?ref=app
+ 1
@sayan looks good but I think you wanted the output to be original list --> sorted list rather than sorted list --> sorted list (?)
0
@sayan
it does not work for [5,51,516]
0
this challenge has been proposed earlier.
i would grateful if someone can find test case when my code does not work
https://code.sololearn.com/cZ24Q62ArDRS/?ref=app
- 1
@@ david..
given list-->sorted list such that it forms biggest number-->joined list...
my output is very clear...