Given a list of non-negative integers, arrange them such that they form the largest possible number and return it as a string. Pattern focus: Sorting First. Compare numbers by the concatenated order that yields the larger combined string, not by numeric value alone.
nums = list of non-negative integers
string representation of the largest concatenated number
Example 1:
Input:
nums = [10,2]
Output:
210
Explanation:
Comparing '10' and '2' shows that '2' should come first.
Example 2:
Input:
nums = [3,30,34,5,9]
Output:
9534330
Explanation:
Sorting by pairwise concatenation produces the lexicographically largest number.
Example 3:
Input:
nums = [0,0]
Output:
0
Explanation:
Leading zeros must be collapsed to a single zero.