Skip to content

Commit f7d23e8

Browse files
committed
Add iterative tree
1 parent 5d00773 commit f7d23e8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
- [x] 半年零基础到 LeetCode 300 题,我的算法学习方法论: ✅ [Post](https://dongxiaoran.com/algo/basic/intro/)
2929
- [x] 当我们谈论刷题时,到底在刷什么: ✅ [Post](https://dongxiaoran.com/algo/basic/how/)
3030
- [x] 一题顶四题,一道题掌握 LinkedList 的 Iterative: ✅ [Post](https://dongxiaoran.com/algo/basic/iterativelist/) ⭐️ [Code](src/main/java/algorithm/basic/iterative)
31+
- [x] Tree 还可以这样 O(1) 空间遍历?四题带你深入理解 LinkedList 与 Tree 的关系: ✅ [Post](https://dongxiaoran.com/algo/basic/treetolist/) ⭐️ [Code](src/main/java/algorithm/basic/iterativetree)
3132

3233
- [ ] Binary Search
3334

src/main/java/algorithm/basic/iterative/ReorderList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Given a singly linked list L_0 → L_1 → … → L_{n-1} → L_n
7-
* Reverse it to L_n → L_{n-1} → … → L_1 → L_0
7+
* Reverse it to L_0 → L_n → L_{n-1} → … → L_1 → L_0
88
*/
99
public class ReorderList {
1010
public void reorderList(ListNode head) {

0 commit comments

Comments
 (0)