You hold cards, each printed with a non-negative integer cards[i]. Lay all cards in a row to form the largest possible number and return it as a string (the result may exceed any integer type).
If every card is 0, return "0" (not "000").
Examples
Input: cards = [10, 2]
Output: "210"
Input: cards = [3, 30, 34, 5, 9]
Output: "9534330"
Constraints
1 <= len(cards) <= 2 * 10**40 <= cards[i] <= 10**9- Target complexity: O(n log n) comparisons.
Goals
- Define an order between two numbers by comparing their concatenations
- Turn a pairwise comparison into a sort with functools.cmp_to_key
- Handle the all-zero edge case