All challenges

Algorithm challenge · DSA

Valid Parentheses

Difficulty

medium

Time

~20m

Format

Single

Grading

Auto-graded

#python#javascript#typescript#go#java#cpp#rust#dsa#stack#strings
Mission file // read carefullymedium

Given a string s of just ()[]{}, return true if every bracket is closed by the same type in the correct order.

"()[]{}" => true     "([)]" => false

Build with

isValid(s: string) → bool
PythonJavaScriptTypeScriptGoJavaC++Rust
5 tests · 1 hidden
Auto-graded on submit
Start challenge

Sign in to save your progress.