diff --git a/docs/dataStructures-algorithms/几道常见的链表算法题.md b/docs/dataStructures-algorithms/几道常见的链表算法题.md index 79b74441..85e2934e 100644 --- a/docs/dataStructures-algorithms/几道常见的链表算法题.md +++ b/docs/dataStructures-algorithms/几道常见的链表算法题.md @@ -225,7 +225,7 @@ public class Solution { while (node1 != null) { node1 = node1.next; count++; - if (k < 1 && node1 != null) { + if (k < 1) { node2 = node2.next; } k--;