Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Given a string of round, curly, and square open and closing brackets, return whether the brackets are balanced (well-formed).
- Obs:
- - Without using recursive regex
- Examples:
- 1. () -> true
- 2. [] -> true
- 3. (()) -> true
- 4. ([]) -> true
- 5. ( -> false
- 6. ) -> false
- 7. ([)] -> false
- 8. ([])[]({}) -> true
- 9. ((() -> false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement