mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-03 02:25:57 +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.
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user