📅  最后修改于: 2022-03-11 14:44:58.263000             🧑  作者: Mango
# Definition of a singly linked list
struct ListNode {
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int x, ListNode *next) : val(x), next(next) {}
};