Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Largest Number
Medium
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Given a list of non-negative integers, arrange them to form the largest possible number.
Sample Input:
[10,2]
Sample Output:
"210"
Hints
Hint 1
Custom sort: a+b > b+a means a should come before b
Hint 2
Convert numbers to strings for comparison
Hint 3
Handle leading zeros case
Code Editor
Reset
Run
Save
Loading...