https://leetcode.cn/problems/ba-shu-zu-pai-cheng-zui-xiao-de-shu-lcof/description/
class Solution {
// 15, 8, 7
public String crackPassword(int[] password) {
List<String> list = new ArrayList();
for(int num : password) {
list.add(String.valueOf(num));
}
list.sort((s1, s2) -> (s1 + s2).compareTo(s2 + s1));
StringBuilder sb = new StringBuilder();
for(String str : list) {
sb.append(str);
}
return sb.toString();
}
}