Checking parentheses

Write a program that checks the correct parenthesization of several
given words by using a stack of characters.

Input

Input consists of several non-empty words made up only of ‘(’, ‘)’, ‘[’
and ‘]’.

Output

For every word, tell if it is correct or not, following the format of
the example.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:39:41.642Z

© Jutge.org, 2006–2026.
https://jutge.org
