Given a list of non-negative integers, nums, rearrange them so that they form the largest possible number. As the result may be very large, return it as a string.
Constraints:
At first glance, one might think sorting the numbers from largest to smallest would work, but that fails in cases like [3,30]. Putting 30 before 3 gives “303”, but putting 3 before 30 gives “330”, which is larger. So, instead of comparing the numbers directly, we ...