@@ -0,0 +1,1186 @@
+import java.util.*;%0A%0A/**%0A * Largest Number %0A * Given a list of non negative integers, arrange them such that they form the largest number.%0A * For example, given %5B3, 30, 34, 5, 9%5D, the largest formed number is 9534330.%0A * Note: The result may be very large, so you need to return a string instead of an integer.%0A * Tags: Sort%0A * Notes: PriorityQueue and Comparator%0A * @author chenshuna%0A */ %0A %0Apublic class LargestNumber %7B%0A    public String largestNumber(int%5B%5D nums) %7B  %0A        Queue%3CString%3E queue = new PriorityQueue%3C%3E(new Comparator%3CString%3E()%7B%0A            public int compare(String num1, String num2)%7B%0A                return (num2 + num1).compareTo(num1 + num2);%0A            %7D%0A        %7D);%0A        for(int num : nums)%7B%0A            queue.offer(num + %22%22);%0A        %7D%0A        StringBuilder sb = new StringBuilder();%0A        while(queue.size() %3E 0)%7B%0A            sb.append(queue.poll());%0A        %7D%0A        /**%0A         * Need care the special case like %5B0,0%5D, return 0;%0A         */ %0A        int sLen = sb.length();%0A        int i = 0 ;%0A        while(i %3C sLen && sb.charAt(i) == '0')%0A        %7B%0A            i++;%0A        %7D%0A        if(i == sLen) return %220%22;%0A        return sb.substring(i);%0A    %7D%0A%7D

add 179