LinkedList解题方法小结

LeetCode上相关的题目(easy)

2, 21, 82, 83, 86, 141, 160, 203, 206, 234, 237

Medium题目

142

技巧

  1. 双指针,一个走两步,一个走一步,这样一个到了终点,另一个就到了中间了
  2. 双指针还能用于检测是否有cycle
  3. 切忌使用dummy创建新的linkedlist

This site Original article All followed" Attribution—NonCommercial—ShareAlike 4.0 (CC BY-NC-SA 4.0) ”。 Please keep the following marks for sharing and interpretation:

Original author: Jake Tao Source: 「LinkedList解题方法小结」

Praise 222
0 0 222

Further reading

Post a reply

Log in can only be commented on later
Share this page
Back to top