Multiple Choice
In the algorithm that checks for a balanced expression, which of the following is true if a closing bracket is encountered?
A) if the stack is empty, the brackets balance
B) if the item on the top of the stack is a closing bracket of the same type, the brackets balance
C) if the stack is empty or the item on the top of the stack is not an opening bracket of the same type, the brackets don't balance
D) if the stack is empty or the item on the bottom of the stack is an opening bracket of the same type, the brackets balance
Correct Answer:

Verified
Correct Answer:
Verified
Q21: Which of the following is NOT an
Q22: In the algorithm to evaluate a postfix
Q23: In the algorithm to evaluate a postfix
Q24: When using a stack to evaluate the
Q25: The first step in evaluating a postfix
Q27: Using a stack is a good approach
Q28: Addition and subtraction have higher precedence when
Q29: The time complexity of the postfix expression
Q30: Which of the following is NOT an
Q31: What is the function of the peek