您的位置: 首页 > IT文章 > 单链表的反转 单链表的反转 分类: IT文章 • 2025-01-02 14:04:37 public static ListNode reveseList (ListNode head) { // write code here ListNode tmp=head.next; ListNode newHead=reveseList(head.next); tmp.next=head; head.next=null; return newHead; }