Practice Largest Number
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given a list of non-negative integers nums, arrange them such that they form the largest number and return it. Since the result may be very large, so you need to return a string instead of an integer.
Source: Largest Number on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
nums = [10,2]
Output
"210"
# Example 2
Input
nums = [3,30,34,5,9]
Output
"9534330"
Constraints
1 <= nums.length <= 100
0 <= nums[i] <= 10^9
Related LeetCode Problems
Practice more problems similar to Largest Number.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.