We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac41735 commit 29d92e1Copy full SHA for 29d92e1
src/main/java/com/fishercoder/solutions/_206.java
@@ -31,11 +31,6 @@ public ListNode reverseList(ListNode head) {
31
}
32
33
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
- */
39
public ListNode reverseList(ListNode head) {
40
return reverse(head, null);
41
0 commit comments