diff --git a/src/main/java/cn/whaifree/redo/redo_all_240511/LeetCode206.java b/src/main/java/cn/whaifree/redo/redo_all_240511/LeetCode206.java index 05c9262..46e99f7 100644 --- a/src/main/java/cn/whaifree/redo/redo_all_240511/LeetCode206.java +++ b/src/main/java/cn/whaifree/redo/redo_all_240511/LeetCode206.java @@ -18,7 +18,6 @@ public class LeetCode206 { listNode.printList(); ListNode listNode1 = new Solution().reverseList(listNode); listNode1.printList(); - } class Solution { @@ -34,7 +33,10 @@ public class LeetCode206 { ListNode next = after.next; after.next = pre; ListNode reverse = reverse(after, next); + + return reverse; + } } }