赞
踩
PriorityQueue<Integer> pq = new PriorityQueue<>(Comparator.reverseOrder());
PriorityQueue pq = new PriorityQueue<>(new Comparator<Integer>() {
@Override
public int compare(Integer a, Integer b) {
return b - a;
}
});
PriorityQueue<Integer> pq = new PriorityQueue<>((a, b) -> b - a);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。