This commit is contained in:
1AoB 2024-04-24 16:50:48 +08:00
parent 67d61bcc14
commit eeff30e99b
2 changed files with 34 additions and 0 deletions

View File

@ -60,3 +60,37 @@ public:
*/ */
``` ```
# 2.35. 反转链表
```cpp
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
//https://leetcode.cn/problems/reverse-linked-list/
//难点:单链表要建立一个前驱节点
//关键点:画图
class Solution {
public:
ListNode* reverseList(ListNode* head) {
}
};
```
![1713948511743](图片/1713948511743.png)
# 3.19. 二叉树的下一个节点
```cpp
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB