```
/*
SPACE: O(N) TIME: O(N)
PRIORITYQUEUE
*/
import java.util.*;
public class Solution
{
public static String findLargestNum(LinkedListNode<Integer> head)
{
PriorityQueue<Integer> pq = new PriorityQueue<>((a,b)-> b-a);
Boolean flag = false;
while(head != null){
if(pq.isEmpty() && head.data.equals(0)){
flag = true;
}else{
pq.add((int)head.data);
}
head = head.next;
}
if(pq.isEmpty()){
String s= "0";
return s;
}
if(flag && !pq.isEmpty()){
pq.add(0);
}
StringBuilder sb = new StringBuilder();
while(!pq.isEmpty()){
sb.append(pq.poll());
}
return sb.toString();
}
}
```