Question: Q) In the linked list implementation of the stack class, where does the push member function place the new entry on the linked list? A.
Q) In the linked list implementation of the stack class, where does the push member function place the new entry on the linked list?
A. At the head
B. At the tail
C. After all other entries that are greater than the new entry.
D. After all other entries that are smaller than the new entry.
-----------------------------------------------------------------------------------------------------------------------------------------------
Q) In the array version of the stack class (with a fixed-sized array), which operations require linear time for their worst-case behavior?
A. is_empty
B. Peek
C. Pop
D. Push
-----------------------------------------------------------------------------------------------------------------------------------------------
Q) In the linked-list version of the stack class, which operations require linear time for their worst-case behavior?A. is_empty
B. Peek
C. Pop
D. Push
E. None of these operations require linear time.
-----------------------------------------------------------------------------------------------------------------------------------------------
Q) What is the value of the postfix expression 6 3 2 4 + - *:
A. Something between -15 and -100
B. Something between -5 and -15
C. Something between 5 and -5
D. Something between 5 and 15
E. Something between 15 and 100
-----------------------------------------------------------------------------------------------------------------------------------------------
Q) Here is an infix expression: 4+3*(6*3-12). Suppose that we are using the usual stack algorithm to convert the expression from infix to postfix notation. What is the maximum number of symbols that will appear on the stack AT ONE TIME during the conversion of this expression?
A. 1
B. 2
C. 3
D. 4
E. 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
