0
/ 1.0
Description
Write a method balancedParens that checks if the given string has properly nested parentheses.
Method Signature:
public...
Write a method balancedParens that checks if the given string has properly nested parentheses.
Method Signature:
public boolean balancedParens(String str)
Stack class is available online.String class is available online.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.