mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-04 02:59:43 +08:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user