链表做题技巧

1、预设一个虚拟的头节点
result := &ListNode{-1, head}

posted @ 2022-02-18 11:25  陈华波  阅读(28)  评论(0)    收藏  举报