你可以选自己擅长的语言做题并上传代码,该网站会用各种极端情况的输入值测试你的代码,如果没有出错,则同其他人上传的代码效率做比较、排名
问题179. Largest Number
以下是本人渣翻译Given a list of non negative integers, arrange them such that they form the largest number.
For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.
Note: The result may be very large, so you need to return a string instead of an integer.
Credits:
Special thanks to @ts for adding this problem and creating all test cases.
Subscribe to see which companies asked this question
可惜可以在该网站上传测试的语言类型有限,C/C++, java, python, ruby, js, go给出一系列正整数,对这些数进行排列,使其拼凑出一个尽可能大(最大)的数。
例如,给出[3, 30, 34, 5, 9],则这些数所能拼凑出的最大数字是 9534330。
注:给出的数组元素数量不定,结果可能非常非常大,所以你需要将结果作为字符串返回而不是int类型的整数(尤其是对于那些强类型的语言)