public void add(Racer o) {
LinkedListNode added = new LinkedListNode(o);
LinkedListNode first = head;
LinkedListNode last = tail;
Racer First = (Racer) first.getElement();
Racer Added = (Racer) added.getElement();
Racer Last = (Racer) last.getElement();
if (First.time >= Added.time) {
added.setNext(head);
head = added;
}
else {
while(true){
.
.
.
.
.
.
我必须对 Linked List 中赛马的时间记录进行排序
我真的不明白如何编写我的 SortedLinkedList 的 add 方法......
我在上面写了一些代码开始
谁能帮帮我吗?