diff --git a/java/07_linkedlist/LinkedListAlgo.java b/java/07_linkedlist/LinkedListAlgo.java index bf9c5b4..e5fb99f 100644 --- a/java/07_linkedlist/LinkedListAlgo.java +++ b/java/07_linkedlist/LinkedListAlgo.java @@ -20,12 +20,7 @@ public class LinkedListAlgo { pre = curr; curr = next; } - //我的比教程更加简洁 - if (pre == null) { - return list; - } else { - return pre; - } + return pre; } // 检测环