mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
c++
This commit is contained in:
parent
67d61bcc14
commit
eeff30e99b
@ -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) {
|
||||
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||

|
||||
|
||||
# 3.19. 二叉树的下一个节点
|
||||
|
||||
```cpp
|
||||
|
||||
```
|
||||
|
||||
|
BIN
exampleSite/content/post/给个offer/图片/1713948511743.png
Normal file
BIN
exampleSite/content/post/给个offer/图片/1713948511743.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
Loading…
Reference in New Issue
Block a user