179. Largest Number
## 思路
sorting
写个compare function比较数字字串 (A+B , B+A)
然后有个corner case [0, 0, 0] -> '0'
## Code
```python
from functools import cmp_to_key
class Solution:
def largestNumber(self, nums: List[int]) -> str:
nums = list(map(str, nums))
def compare(a, b):
if a + b > b + a:
return 1
if a + b < b + a:
return -1
return 0
nums.sort(key=cmp_to_key(compare), reverse=True)
if nums[0] == '0':
return '0'
return ''.join(nums)
```