You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

452 B

Test a String for '(),[],{}' well-formedness


A string over the characters ()[]{} is said to be well-formed, if the different types of brackets match in the correct order.

Write a program that outputs true or false depending on the well-formedness of the input.


Input Output
([{}])() true
([)] false


Input strings consist only of characters ()[]{}