Intuition
- Sort the numbers as strings in ascending order, the comparator is (s2 + s1).compareTo(s1 + s2)
solution
|
|
problem
WA.
Input:
[0,0]
Output:
“00”
Expected:
“0”
reason
Miss the zero situation.
modification
|
|
solution
|
|
problem
WA.
Input:
[0,0]
Output:
“00”
Expected:
“0”
reason
Miss the zero situation.
modification
|
|