Skip to main content
Valid Parentheses | AlgoCracked
AlgoCracked
ProblemsValid Parentheses
Easy41.0% acceptance
Blind75StringStack

Valid Parentheses

Given a string s containing only the characters ()[]{} , decide whether every bracket is closed by the same type and in the correct order . An opening bracket must be closed by the matching closing bracket, and brackets must close in the reverse order they were opened. Input format Input is [s] , e.g. [ ()[]{} ] .

Loading workspace…