Skip to content

Commit 29d92e1

Browse files
refactor 206
1 parent ac41735 commit 29d92e1

File tree

1 file changed

+0
-5
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-5
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ public ListNode reverseList(ListNode head) {
3131
}
3232

3333
public static class Solution2 {
34-
/**
35-
* following the above iterative version, the recursive solution flows out so naturally:
36-
* basically, we just replaced the while loop with a recursive function
37-
* still, a null newHead proves to be very helpful.
38-
*/
3934
public ListNode reverseList(ListNode head) {
4035
return reverse(head, null);
4136
}

0 commit comments

Comments
 (0)