Revise the destructor in the class LinkedListso that it directly deletes eachnode of the underlying linked chain without calling either clearor remove.
What will be an ideal response?
```
template
LinkedList
{
while (headPtr != nullptr)
{
Node
headPtr = headPtr->getNext();
// Return node to the system
nodeToDeletePtr->setNext(nullptr);
delete nodeToDeletePtr;
} // end while
// headPtr is nullptr
nodeToDeletePtr = nullptr;
itemCount = 0;
} // end destructor
```
You might also like to view...
You click commands on the Document bar to handle document tasks.
Answer the following statement true (T) or false (F)
If a given task being performed by a function involves more than one object, then that function should normally be a __________ function.
Fill in the blank(s) with the appropriate word(s).
Which of the following is an interagency body empowered to prescribe uniform principles, standards, and report forms for the federal examination of financial institutions?
A) NCUA B) FRB C) FDIC D) FFIEC
Powerpoint sucks?