We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1b6da6 commit a02df76Copy full SHA for a02df76
split-a-circular-linked-list/test.cpp
@@ -108,9 +108,10 @@ TEST(split_a_circular_linked_list, test2)
108
auto input = vector<int> { 2, 6, 1, 5 };
109
auto output = vector<vector<int>> { { 2, 6 }, { 1, 5 } };
110
auto* list = ArrayToCircularLinkedList(input);
111
- auto result = Solution().splitCircularLinkedList(list) | transform(CircularLinkedListToArray);
+
112
auto nodes = unordered_set<ListNode*> {};
113
TraversalCircularListNode(list, [&](auto* node) { nodes.insert(node); });
114
+ auto result = Solution().splitCircularLinkedList(list) | transform(CircularLinkedListToArray);
115
assertContentEquals(result, output);
116
for (auto* node : nodes) {
117
delete node;
0 commit comments