vault backup: 2022-09-20 13:19:16

This commit is contained in:
juan 2022-09-20 13:19:16 +08:00
parent beb42d5156
commit 2f2e8488d3

View file

@ -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