Why is "([)]" invalid?

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

Question

Why is "([)]" invalid?

Option A — Correct answer

The close order does not match the most recent open

Option B

It has too many characters

Option C

It has no brackets

Option D

It starts with an open bracket

Explanation

The brackets close in the wrong nested order.

Valid Parentheses - Stack matching Pattern Practice Quiz

All questions · Previous question · Next question

Open on QuizMaker