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.
bool cmp(const string a, const string b){
return (a+b) > (b+a);
}
class Solution {
public:
string tostring(int x){
if(x == 0) return "0";
string tmp = "";
while(x){
tmp = (char)(x%10+'0') + tmp;......
阅读全文