添加 CarrieOn 作者链接,删除对应中文图片文件夹
@ -1,5 +1,9 @@
|
|||||||
# Reverse Part of a Linked List via Recusion
|
# Reverse Part of a Linked List via Recusion
|
||||||
|
|
||||||
|
**Author: [labuladong](https://github.com/labuladong)**
|
||||||
|
|
||||||
|
**Translator: [CarrieOn](https://github.com/CarrieOn)**
|
||||||
|
|
||||||
It's easy to reverse a single linked list using iteration, however it's kind of difficult to come up with a recursive solution. Furthermore, if only part of a linked list needs reversed, can you nail it with **recursion**?
|
It's easy to reverse a single linked list using iteration, however it's kind of difficult to come up with a recursive solution. Furthermore, if only part of a linked list needs reversed, can you nail it with **recursion**?
|
||||||
|
|
||||||
If you haven't known how to **recursively reverse a single linked list**, no worry, we will start right here and guide you step by step to a deeper level.
|
If you haven't known how to **recursively reverse a single linked list**, no worry, we will start right here and guide you step by step to a deeper level.
|
||||||
@ -182,6 +186,4 @@ Compared to iteration, it is a little bit difficult to understand recursion, the
|
|||||||
|
|
||||||
For time complexity, iteration is O(1) while recursion is always O(N). For space complexity, iteration needs O(N) while recursion needs stack. Overall, iteration has a better performance. Solutions in this article provides you a good way to learn recursion.
|
For time complexity, iteration is O(1) while recursion is always O(N). For space complexity, iteration needs O(N) while recursion needs stack. Overall, iteration has a better performance. Solutions in this article provides you a good way to learn recursion.
|
||||||
|
|
||||||
**Mission**: Stick to original high quality articles, and make algorithms easy to understand. Welcome to subscribe my Wechat public account `ID:labuladong` for latest articles.
|
**Mission**: Stick to original high quality articles, and make algorithms easy to understand. Welcome to subscribe my Wechat public account `ID:labuladong` for latest articles.
|
||||||
|
|
||||||

|
|
Before Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 161 KiB |
Before Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 28 KiB |