摘要:        
public class MyBiLinkedList { Node head; Node tail; public Node getLast() { // temp变量来保存链表的最后那个节点 Node temp = head; while (temp.next != null) { temp = temp.next; } // 循环结束时,temp就是最后那个节点 return temp; }    阅读全文
posted @ 2019-10-07 13:04
踏月而来
阅读(950)
评论(0)
推荐(0)
        
            
        
        
摘要:        
比如有一个链表是这样的,1->2->3->4->5,反转后成为 5->4->3->2->1    阅读全文
posted @ 2019-10-07 11:01
踏月而来
阅读(158)
评论(0)
推荐(0)
        

 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号