mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-10 05:57:14 +08:00
Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -121,12 +121,9 @@ static void test() {
|
|||||||
assert(4 == median1->val); // 4 is the value of the median node.
|
assert(4 == median1->val); // 4 is the value of the median node.
|
||||||
std::cout << "test case:2 passed\n";
|
std::cout << "test case:2 passed\n";
|
||||||
|
|
||||||
// Clean up
|
delete head1;
|
||||||
while (head2) {
|
delete temp;
|
||||||
ListNode* t = head2;
|
|
||||||
head2 = head2->next;
|
|
||||||
delete t;
|
|
||||||
}
|
|
||||||
delete head2;
|
delete head2;
|
||||||
delete temp2;
|
delete temp2;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user