📅  最后修改于: 2022-03-11 14:52:29.308000             🧑  作者: Mango
int arr[]={1,2,1,3,3,5,7};
PriorityQueue a=new PriorityQueue<>();
for(int i:arr){
a.add(i);
}
while(!a.isEmpty())
System.out.println(a.poll());