diff --git a/OJ notes/pages/Leetcode Reverse-Linked-List.md b/OJ notes/pages/Leetcode Reverse-Linked-List.md index d305147..7fb69cf 100644 --- a/OJ notes/pages/Leetcode Reverse-Linked-List.md +++ b/OJ notes/pages/Leetcode Reverse-Linked-List.md @@ -23,6 +23,7 @@ ##### Revisions: 2022-07-02 +2022-09-20 ##### Related topics: @@ -70,8 +71,15 @@ Given the `head` of a singly linked list, reverse the list, and return _the reve ### Thoughts +Many ways to implement this. from slow but easy ones, to +fast but hard ones: + +#### Easy way: + I thought a slow O(n ^ 2) hybrid solution, while there are better algorithms, using in-place insert, or recursion. +#### Fast way: + The in place insert is easier to understand, and simple to implement, using a very clever trick. > [!summary] My thoughts on the recursion algorithm