leetcode 179. Largest Number 发表于 2018-09-25 | 分类于 leetcode 题目链接:leetcode 思路:排序 123456class Solution(object): def largestNumber(self, num): comp=lambda a,b:1 if a+b>b+a else -1 if a+b<b+a else 0 num=map(str,num) num.sort(cmp=comp,reverse=True) return str(int("".join(num)))