Vidyalelo
Data Structure · Q209

Introduction to Data Structures

Programming · Data Structure · question 209

Q209

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?

A.
1
B.
2
Answer
C.
3
D.
4 or more

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board