單鏈表反轉

public ListNode reverseList(ListNode head) { if (head == null) return null; ListNode p = head.next; head.next = null; ListNode q = head; ListNode pr; wh
相關文章
相關標籤/搜索