What must be true after scanning all brackets?

Practice this question from Valid Parentheses - Stack matching Pattern Practice Quiz, with options and an explanation.

Question

What must be true after scanning all brackets?

Option A — Correct answer

The stack is empty

Option B

The stack has one opening bracket

Option C

The stack has all closing brackets

Option D

The string length is odd

Explanation

The stack must be empty.

Valid Parentheses - Stack matching Pattern Practice Quiz

All questions · Previous question

Open on QuizMaker