16 lines
300 B
C++
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
|