Programming Interview Questions 14: Check Balanced Parentheses | Arden DertatArden Dertat
Given a string of opening and closing parentheses, check whether it's balanced. We have 3 types of parentheses: round brackets: (), square brackets: [], and curly brackets: {}. Assume that the string doesn't contain any other character than these, no spaces words or numbers. Just to remind, balanced parentheses require every opening parenthesis to be closed in the reverse order opened. For example '([])' is balanced but '([)]' is not.
Read full article from Programming Interview Questions 14: Check Balanced Parentheses | Arden DertatArden Dertat
No comments:
Post a Comment