Deallocating all in Circular LL
•The previous slide would have caused a seg fault (dereferencing a null pointer) if the list was already empty...
•By adding the following at the beginning, would we have solved this problem?
–if (!head) return;
–
–yes, but there is another choice.