MCPcopy Create free account
hub / github.com/Ainevsia/Leetcode-Rust / main

Function main

160. Intersection of Two Linked Lists/Solution.cpp:46–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44};
45
46int main(int argc, char const *argv[])
47{
48 ListNode n1 = ListNode(1);
49 ListNode n3 = ListNode(3);
50 ListNode n5 = ListNode(5);
51 ListNode n7 = ListNode(7);
52 ListNode n9 = ListNode(9);
53 ListNode n11 = ListNode(11);
54 ListNode n2 = ListNode(2);
55 ListNode n4 = ListNode(4);
56 n1.next = &n3;
57 n3.next = &n5;
58 n5.next = &n7;
59 n7.next = &n9;
60 n9.next = &n11;
61 n2.next = &n4;
62 n4.next = &n9;
63 Solution a;
64 assert(a.getIntersectionNode(&n1, &n2) == &n9);
65
66 return 0;
67}

Callers

nothing calls this directly

Calls 2

getIntersectionNodeMethod · 0.80
ListNodeClass · 0.70

Tested by

no test coverage detected