LeetCode: Reverse Linked List Solution and Explanation

Hi, In this article I will explain my solution for the following LeetCode problem: Reverse Linked List. If you’re interested in solving this problem then please try to spend at least one hour or more on it before looking at my solution. To help you solve this problem I’ve created the following table: Current Prev 1 NULL 2 1 3 2 NULL 3 Think about how you can use this table to write an iterative or recursive algorithm that reverses the linked list....

November 17, 2020 · 3 min · Denis Nuțiu