题目:
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.
思路:
对于一组数字组成一个数字,越大的数在前面,组成的数字就越大。这个规则显而易见。
但是这条规则多用于位数相同的该组数字相互比较。对于上面这组,3,30,34这三个数字,怎么样才最大呢?
首先,第一位均为3,而3只有一位,如何跟......
阅读全文