Deallocating all in Circular LL
•
Is this better or worse?
–
if (!head) return;
–
node * current = head;
–
node * temp;
–
while (current->next != head) {
–
temp = current->next;
–
delete current;
–
current = temp;
–
}
//now what needs to get done?