Depth First Profile Image
Depth First
2 months ago
0
538
0
26
Reverse Linked List Recursively | LeetCode 206 To reverse a linked list recursively, trust the function to reverse the smaller list starting at the second node. When that call returns, the second node is the last node of the reversed sublist. Point it back to the first node, set the first node’s next to None, and return the new head. Time: O(n) · Space: O(n) for the call stack. #neetcode150 #datastructuresandalgorithms #computerscienceengineering #leetcode #LearnToCode #linkedLists #codinginterview
Download video without watermark
original sound - DepthFirst
•
148s