Construct Largest Number
ARRAY
STRING

Problem

Given a list of non-negative integers nums, arrange them such that they form the largest possible number. Since the result may be very large, return it as a string.

Examples

largestNumber([21,4]); // returns "421" largestNumber([2,3,12]); // returns "3212"
Loading...