leetcode/include/s0160_intersection_of_two_linked_lists.hpp

16 lines
300 B
C++
Raw Normal View History

2022-12-02 09:24:26 +00:00
#ifndef S0160_INTERSECTION_OF_TWO_LINKED_LISTS_HPP
#define S0160_INTERSECTION_OF_TWO_LINKED_LISTS_HPP
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(nullptr) {}
};
class S0160 {
public:
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB);
};
#endif