MCPcopy Create free account
hub / github.com/EricPengShuai/Interview / ListNode

Class ListNode

memo/listnode.cpp:9–15  ·  view source on GitHub ↗

定义链表

Source from the content-addressed store, hash-verified

7
8// 定义链表
9struct ListNode {
10 int val;
11 ListNode *next;
12 ListNode() : val(0), next(nullptr) {}
13 ListNode(int x) : val(x), next(nullptr) {}
14 ListNode(int x, ListNode *next) : val(x), next(next) {}
15};
16
17
18// 迭代法合并链表

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected