What should be done when an opening parentheses is read in a balancing symbols algorithm?

Q & ACategory: Data StructureWhat should be done when an opening parentheses is read in a balancing symbols algorithm?
Admin Staff asked 4 years ago

What should be done when an opening parentheses is read in a balancing symbols algorithm?
a) push it on to the stack
b) throw an error
c) ignore the parentheses
d) pop the stack

1 Answers
Admin Staff answered 4 years ago

a) push it on to the stack