0
/ 1.0
Problem Description
Write a method balancedParens
that checks if the given string has properly nested parentheses.
Method Signature:
...
Write a method balancedParens
that checks if the given string has properly nested parentheses.
Method Signature:
public boolean balancedParens(String str)
Examples:
balancedParens("") -> true
balancedParens("()") -> true
balancedParens("(()(()))") -> true
balancedParens("(()()())") -> true
balancedParens(")(") -> false
balancedParens("print(x + y))") -> false
Your feedback will appear here when you check your answer.