```
class Solution:
# @param {integer[]} nums
# @return {string}
def largestNumber(self, nums):
nums = map(str, nums)
nums.sort( cmp=Solution.comparator)
return str(int(''.join( nums)))
@staticmethod
def comparator(x,y):
# if we have two number 34 and 35, we need to decide in which sequence these should appear in the final result hence,
# simple check 34 + 35 -> 3435 and 35 + 34 -> 3534, hence 3534 is greater than 3435. Thus, 35 should always appear
# before 34. NOTE + sign is for appending.
if int(x+y) > int(y+x):
return -1
else:
return 1
```