Update search/median_search2.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
weiss-ben
2022-09-25 11:39:34 +03:00
committed by GitHub
parent d8b1f35a77
commit b8b5f5fded

View File

@@ -121,12 +121,9 @@ static void test() {
assert(4 == median1->val); // 4 is the value of the median node.
std::cout << "test case:2 passed\n";
// Clean up
while (head2) {
ListNode* t = head2;
head2 = head2->next;
delete t;
}
delete head1;
delete temp;
delete head2;
delete temp2;