O63
Largest Number from Array
Problem Statement & Objective
Given a list of non-negative integers nums, arrange them such that they form the largest possible number as a string.
Function Signature (Python)
largest_number_from_array(nums: list[int]) -> strInput & Output Contract
Output Rule:Oluşturulan en büyük sayının metin temsili.
System Constraints
1 <= sayilar.length <= 100
0 <= sayilar[i] <= 10^9Example Execution Walkthrough
sayilar = [10, 2] -> '210'
sayilar = [3, 30, 34, 5, 9] -> '9534330'Example Test Scenarios (3)
Example 1
Input:
[[10,2]]Expected Output:
"210"Example 2
Input:
[[3,30,34,5,9]]Expected Output:
"9534330"Example 3: Sıfırlar
Input:
[[0,0]]Expected Output:
"0"