Question 10364 – Pipelining
November 12, 2023
Question 10005 – Database-Management-System
November 12, 2023
Question 10364 – Pipelining
November 12, 2023
Question 10005 – Database-Management-System
November 12, 2023

Question 9493 – GATE 2004

The best data structure to check whether an arithmetic expression has balanced parentheses is a

Correct Answer: B

Question 5 Explanation: 
Stack is the best data structure to validate the arithmetic expression.
While evaluating when left parentheses occur then it push in to the stack, when right parentheses occur pop from the stack.
While at the end there is empty in the stack.
A
queue
B
stack
C
tree
D
list
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!