Merge pull request #798 from liushubin-gitHub/patch-1

While deletion, the memory location is deallocated, otherwise may cause unnecessary Overflow incase of large data
This commit is contained in:
Sombit Bose
2020-05-27 10:11:48 +05:30
committed by GitHub

View File

@@ -61,6 +61,7 @@ void double_linked_list::remove(int x) {
t->prev->next = t->next;
t->next->prev = t->prev;
}
delete t;
}
void double_linked_list::search(int x) {