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

30:00

Largest Number
medium
Topics
Companies

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

Example 1:
Input: {"nums":[10,2]}
Output: 210
Constraints:
  • 1nums.length1001 \leq \text{nums.length} \leq 100

  • 0nums[i]1090 \leq \text{nums}[i] \leq 10^9

Input
arr ={"nums":[10,2]}
Original Input
10
2
Variables
No variables to display
DepthFunction Call
1largestNumber(nums=[2])
0/6