Skip to content

Commit

Permalink
update leetcode
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaobinqt committed Sep 6, 2023
1 parent ba7d321 commit 5bee2e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions book.leetcode/docs/medium/19.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ func removeNthFromEnd(head *ListNode, n int) *ListNode {
tmpc = tmpc.Next
}

//fmt.Println("长度为...", length)

// 需要有虚拟头结点是因为,可能删除的是最后的节点,也就是头结点,用虚拟头结点可以统一处理
dummy := &ListNode{
Val: 0,
Next: head,
Expand Down

0 comments on commit 5bee2e8

Please sign in to comment.