Largest Number

Given a list of non-negative integers, arrange them such that they form the largest number and return it as a string.

Constraints

  • 1 <= nums.length <= 100
  • 0 <= nums[i] <= 10^9
Saving… · 2 lines
class Solution:
def largestNumber(self, nums: List[int]) -> str:
Console

Click Run to execute sample tests.