You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have the function BracketMatcher(str) take the str parameter being passed and return 1 if the brackets are correctly matched and each one is accounted for. Otherwise return 0. For example: if str is "(hello (world))", then the output should be 1, but if str is "((hello (world))" the the output should be 0 because the brackets do not correctly match up. Only "(" and ")" will be used as brackets. If str contains no brackets return 1.
The text was updated successfully, but these errors were encountered:
Have the function
BracketMatcher(str)
take thestr
parameter being passed and return1
if the brackets are correctly matched and each one is accounted for. Otherwise return0
. For example: ifstr
is "(hello (world))", then the output should be1
, but ifstr
is "((hello (world))" the the output should be0
because the brackets do not correctly match up. Only "(" and ")" will be used as brackets. Ifstr
contains no brackets return1
.The text was updated successfully, but these errors were encountered: