Question: 6. (10 Points) Given a Linked List implementation of a STACK that holds integers. Stack is initialized with the name InstStack. Write a new void
6. (10 Points) Given a Linked List implementation of a STACK that holds integers. Stack is initialized with the name InstStack. Write a new void member function called countPosNeg(). This function counts and displays the number of positive integers and number of negative integers in IntStack. IntStack must be returned to it's original state after counting. i) Write the detailed pseudo code for the function. You are encouraged to draw pictures to explain your answer. ii) Derive the time function and calculate the Big O to the tightest upper bound of the function countPosNeg() that you have written in the previous part
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
