A solution to the problem of reversing a singly linked list, is presented - both iterative and recursive (using recursion). The function reverseList takes the head of a linked list as input and returns the head of the reversed linked list. The implementation uses an iterative approach to reverse the list in-place, meaning it does not require additional memory for a new list. Then, the recursive approach reverses the list by the use of a helper function and the recursive stack. The time complexity is O(N), where n is the number of nodes in the list, as each node is visited exactly once. The space complexity is O(1) for the iterative version because the reversal is done in-place without using additional memory for data structures. This makes it an optimal solution for reversing a linked list. The space complexity is O(N) for the recursive version, due to the use of the recursive stack. 0:00 - Problem Statement 0:59 - Drawing & Explanation 5:00 - Coding & Implementation - Iterative 6:15 - Complexity Analysis - Iterative 6:40 - Coding & Implementation - Recursive 8:00 - Complexity Analysis - Recursive Related article on Medium, with full explanation: https://medium.com/@avrdan/leetcode-206-reverse-linked-list-in-c-recursive-iterative-cpp-solution-interview-ffa129ffedcc leetcode 206 #cpp #leetcode #linkedlists #recursion #iteration #codinginterview