https://school.programmers.co.kr/learn/courses/30/lessons/42746?language=java
def solution(numbers):
number_st = [str(num) for num in numbers]
number_st = number_st.sort(key=lambda x: x * 3, reverse=True)
return ''.join(str(number_st))
import java.util.Arrays;
class Solution {
public String solution(int[] numbers) {
StringBuilder answer = new StringBuilder();
String[] nums = new String[numbers.length];
for (int i = 0; i < nums.length; i ++) {
nums[i] = String.valueOf(numbers[i]);
}
Arrays.sort(nums, (a, b) -> (b + a).compareTo(a + b));
if (nums[0].equals("0")) return "0";
for (String s: nums) answer.append(s);
return answer.toString();
}
}