摘要: 使用java做算法题时,与堆相关的常用操作: 大顶堆: //其中map为全局变量 PriorityQueue<Integer> pq = new PriorityQueue<>(new Comparator<Integer>( public int comapre(Integer a, Intege 阅读全文
posted @ 2021-12-07 10:51 子于舟 阅读(36) 评论(0) 推荐(0)