Anyone have any idea how to write a function that balances parentheses using recursion?
I was thinking of counting the number of times each outer or inner parenthesis pops up in a string, but then it would miss cases like this "()())()(" or this ")(".
My instructor had examples of recursion that solved factorials and calculated numbers of the fibonacci sequence, but she never really went over solving other types of problems.