Given a list of strings of bracket characters: {}() the string of brackets is balanced under the following conditions: 1. it is the empty string 2. if strings a and b are balanced, then ab is balanced 3. if string a is balanced, then (a) and {a} are balanced write a class that determins whether the brackets in each string are balanced and returns true if the string is balanced or false if it is not.
Answers
Answered by
2
and b are balanced, then ab is balanced 3. if string a is balanced, then (a) and {a} are balanced write a class that determins whether the brackets in each string are balanced and returns true if the string is balanced or false if it is not
Similar questions
English,
17 days ago
Math,
17 days ago
Math,
17 days ago
Chemistry,
1 month ago
Computer Science,
1 month ago
Social Sciences,
9 months ago
English,
9 months ago