s0206
This commit is contained in:
18
include/s0206_reverse_linked_list.hpp
Normal file
18
include/s0206_reverse_linked_list.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef S0206_REVERSE_LINKED_LIST_HPP
|
||||
#define S0206_REVERSE_LINKED_LIST_HPP
|
||||
|
||||
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) {}
|
||||
};
|
||||
|
||||
class S0206 {
|
||||
public:
|
||||
ListNode* reverseList1(ListNode* head);
|
||||
ListNode* reverseList2(ListNode* head);
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user