leetcode 上的一道题:Largest Number 2015/09/15 14174 class Solution: # @param num, a list of integers # @return a string def largestNumber(self, num): num = [str(x) for x in num] print num num.sort(cmp=lambda x, y: cmp(y+x, x+y)) return ''.join(num).lstrip('0') or '0'