8000 refactor 206 · sreekanthrcs62/Leetcode@66939c6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 66939c6

Browse files
refactor 206
1 parent 1325a93 commit 66939c6

File tree

1 file changed

+1
-2
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+1
-2
lines changed

src/main/java/com/fishercoder/solutions/_206.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ public static class Solution2 {
4141
* still, a null newHead proves to be very helpful.
4242
*/
4343
public ListNode reverseList(ListNode head) {
44-
ListNode newHead = null;
45-
return reverse(head, newHead);
44+
return reverse(head, null);
4645
}
4746

4847
ListNode reverse(ListNode head, ListNode newHead) {

0 commit comments

Comments
 (0)
0