Valid Parentheses (Go)
Source: LeetCode #20
Topics: stack, strings
Problem
Given a string s containing only the characters ()[]{}, return true if every bracket is
closed by a bracket of the same type, in the correct order.
isValid("()[]{}") // true
isValid("(]") // false
isValid("([{}])") // true
isValid("([)]") // false
Only solution.go is yours to edit; it's compiled against the trusted solution_test.go.
Run
go test -v ./challenges/valid-parentheses/go/
Sign in to submit your solution.