Question: What is the Big O notation of our destructor function SLinkedList : :-SLinkedlist) SListNode *nodePtr; // To traverse the list SListNode nextNode; II To point

 What is the Big O notation of our destructor function SLinkedList:

What is the Big O notation of our destructor function SLinkedList: :-SLinkedlist) SListNode *nodePtr; // To traverse the list SListNode nextNode; II To point to the next node Position nodePtr at the head of the list. nodePtr-head; /I while nodePtr is not at the end of the list... while (nodePtr !- nullptr) // Save a pointer to the next node. nextNode nodePtr->getNextNodeO; Delete the current node. delete nodePtr; f Position nodePtr at the next node nodePtr nextNode; 0 0(1) O 01n lg n) o(2")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!