Discuss Forum
1.
The data structure required to check whether an expression contains balanced parenthesis is?
- A. Stack
- B. Stack
- C. Stack
- D. Stack
Answer: Option A
Explanation:
The data structure required to check whether an expression contains balanced parenthesis is a stack.
This is a simple data structure in which elements can be added and removed in a specific order. In other words, it follows a LIFO or a FILO structure.
Post your comments here: