import java.util.*;

public class Solution { /** * 最大数 * @param nums int整型一维数组 * @return string字符串 */ public String solve (int[] nums) { // write code here String[] str = new String[nums.length]; for(int i = 0;i < nums.length;i ++){ str[i] = ""+nums[i]; } Arrays.sort(str,(m,n)->{ return (n+""+m).compareTo(m+""+n); }); StringBuilder temp = new StringBuilder(); for(int i = 0 ; i < nums.length;i++){ temp.append(str[i]); } if(temp.charAt(0) == '0')return "0"; return temp.toString(); } }