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)
```