Question: data structures Shift Ctrl Linkedlist: const int & searchList() const; void addNode(int& e): private: dataNode* head; Part V: Queue Manipulation (14 points) Assume I want
Shift Ctrl Linkedlist: const int & searchList() const; void addNode(int& e): private: dataNode* head; Part V: Queue Manipulation (14 points) Assume I want to build a queue which can be implemented as either (a) standard array, (b) circular array or (c) circularly-linked list. 1. Of the 3 choices above, which approach is clearly the least efficient and why? (4 points) 2. Explain, in English, the steps necessary to process enqueue and dequeue functions using the circular array structure. (5 points) 3. Explain, in English, the steps necessary to process enqueue and dequeue functions using the circularly-linked list. (5 points) Part VI: Computation Using Stacks (10 points) (5+8/2) + 4 8 - 30/(2+8) - 7 Show how you would use 2 stacks to evaluate the above calculation and provide the final answer. Show all work to be able to receive partial credit. Part VII: Trees (14 points) Use the following tree structure to answer all questions: (a) (b) Specify in what order the nodes will be visited for post-order trayersal of the tree. What do we call nodes A and I? Grand ponent, Guenda pomisja 14 points) Shift Ctrl Linkedlist: const int & searchList() const; void addNode(int& e): private: dataNode* head; Part V: Queue Manipulation (14 points) Assume I want to build a queue which can be implemented as either (a) standard array, (b) circular array or (c) circularly-linked list. 1. Of the 3 choices above, which approach is clearly the least efficient and why? (4 points) 2. Explain, in English, the steps necessary to process enqueue and dequeue functions using the circular array structure. (5 points) 3. Explain, in English, the steps necessary to process enqueue and dequeue functions using the circularly-linked list. (5 points) Part VI: Computation Using Stacks (10 points) (5+8/2) + 4 8 - 30/(2+8) - 7 Show how you would use 2 stacks to evaluate the above calculation and provide the final answer. Show all work to be able to receive partial credit. Part VII: Trees (14 points) Use the following tree structure to answer all questions: (a) (b) Specify in what order the nodes will be visited for post-order trayersal of the tree. What do we call nodes A and I? Grand ponent, Guenda pomisja 14 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
