Arrange the numbers in nums in some order and join them into one number written as a string. Return the largest one. Because the result can be huge, return it as a string. If all numbers are zero, return "0".
For [3, 30, 34, 5, 9] the answer is "9534330".
Example 1
Input:
largest_number([10, 2])
Output:
'210'
Example 2
Input:
largest_number([3, 30, 34, 5, 9])
Output:
'9534330'
0 <= len(nums) <= 300000 <= nums[i] <= 10**9No results yet
Run your code to check it against the examples, or submit to run every test.