leetcode/include/s0160_intersection_of_two_linked_lists.hpp
2022-12-02 17:30:47 +08:00

16 lines
300 B
C++

#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