我必须写一个priotity queye为实现如下因素接口:优先级队列,可比
public interface PQueue<T extends Comparable<T>> {
public void insert(T o); // inserts o into the queue
public T remove(); // removes object with highest priority (by natural order)
}
我会很高兴一些帮助和线索,becouse我甚至不知道如何与这个开始问题。
http://download.oracle.com/javase/6/docs/api/java/util/PriorityQueue.html? – kennytm 2010-10-08 18:48:40
作业吗? – 2010-10-08 18:50:05
证明你已经做出了一些努力。在线或在教科书上阅读优先队列,然后向我们展示您的尝试。 – 2010-10-08 18:51:54