Answer Key
University
Indiana University South BendCourse
MATH-A 100 | Fundamentals of AlgebraPages
8
Academic year
2022
Rose G
Views
16
Process of inserting an element in stack is called Create Push Evaluation Pop, Question 2 In a stack, if a user tries to remove an element from an empty stack it is called Underflow Empty collection Overflow Garbage Collection, Question 3 Entries in a stack are "ordered". What is the meaning of this statement? A collection of stacks is sortable Stack entries may be compared with the '<' operation The entries are stored in a linked list There is a Sequential entry that is one by one, Question 4 Consider the usual algorithm for determining whether a sequence of parentheses is balanced. The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (0(0))(0)))? 1 2 3 4 or more, Question 5 Consider the usual algorithm for determining whether a sequence of parentheses is balanced. Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order). The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation? 1 2 3 4 or more, Question 6 What is the value of the postfix expression 6 324+-*? 1 40 74 -18, Question 7 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. The maximum number of symbols that will appear on the stack AT ONE TIME during the conversion of this expression? 1 2 3 4, Question 8 The postfix form of the expression (A+B)*(C*D- E) *F/G is? AB+ CD*E-FG /** AB+CD* E-F**G/ AB+CD* E - *F*G/ AB + CDE *-*F*G/, Question 9 The data structure required to check whether an expression contains a balanced parenthesis is? Stack Queue Array Tree, Question 10 What data structure would you most likely see in non recursive implementation of a recursive algorithm? Linked List Stack Queue Tree, Question 11 The process of accessing data stored in a serial access memory is similar to manipulating data on a Heap Binary Tree Array Stack, Question 12 The prefix form of A-B/ (C* D^ E) is? -/*^ACBDE -ABCD*^DE -A/B*C^DE -A/BC*^DE, Question 13 What is the result of the following operation? Top (Push (S, X)) X X+S S XS, Question 14 The prefix form of an infix expression (p + q) - (r *t) is? + pq - *rt - +pqr *t - +pq *rt -+*pqrt, Question 15 Which of the following array position will be occupied by a new element being pushed for a stack of size N elements(capacity of stack > N)? S[N-1] S[N] S[1] S[0]
MATH-A 100: Quiz 2 - Stack
Please or to post comments