当前位置 博文首页 > 魏小言的博客:剑指offer&leetcode
题库持续更新中…
一、反转链表
题目描述 输入一个链表,反转链表后,输出链表的所有元素。
//反转链表--迭代 public NodeList reLinkedNode(NodeList head){ if(head == head || head.next == null){ return head; } ListNode pre = nu