Java || 2 simple solution || sort || Priority Queue || Comparator
Using  Priority Queue:-\n\n  public String kthLargestNumber(String[] nums, int k) {\n        PriorityQueue<String> p = new PriorityQueue<>((s1, s2) -> {\n      
#### **Using  Priority Queue:-**\n```\n  public String kthLargestNumber(String[] nums, int k) {\n        PriorityQueue<String> p = new PriorityQueue<>((s1, s2) -> {\n            if (s1.length() == s2.length()) \n                return s1.compareTo(s2);\n            else\n                return Integer.compare(s1.length(), s2.length());\n        });\n        \n       for(String n:nums){\n           p.offer(n);\n           if(p.size() > k){\n               p.poll();\n           }\n       } \n        \n        return p.poll();\n    }\n```\n#### **Using Sort**:-\n```\n public String kthLargestNumber(String[] nums, int k) {\n     Arrays.sort(nums);\n        Arrays.sort(nums, (String a, String b)->a.length()-b.length());\n        return nums[nums.length-k];\n     }\n```\n\n\nif you like it please upvote it
['Sorting', 'Heap (Priority Queue)', 'Java']