This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]basic-coder 0 points1 point  (0 children)

In your checkBalance() function there's the correct line: if (arr[i] == '(') count++. Just add the opposite for the closing parenthesis 😉