This commit is contained in:
17
include/s0019_remove_nth_node_from_end_of_list.hpp
Normal file
17
include/s0019_remove_nth_node_from_end_of_list.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef S0019_REMOVE_NTH_NODE_FROM_END_OF_LIST
|
||||
#define S0019_REMOVE_NTH_NODE_FROM_END_OF_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) {}
|
||||
};
|
||||
|
||||
class Solution {
|
||||
public:
|
||||
ListNode* removeNthFromEnd(ListNode* head, int n);
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user