提交说明:删除了一个空行以优化代码结构,并在Solution类中添加了注释以提高代码可读性。
This commit is contained in:
parent
ed7b36aa7c
commit
af61bc8332
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user