Largest Number

Medium
ArrayStringSortingAmazonGoogle
Given nonnegative integers, arrange them so they form the largest possible number. Print that number as a string. Input format: - First line: n - Second line: n nonnegative integers

Constraints

1 <= n <= 10^5
0 <= nums[i] <= 10^9

Sample tests

Sample 1

Sample 2

Sign in to submit