-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Bug Report for https://neetcode.io/problems/validate-parentheses
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
please change the cases beacause i just write a wrong code and the cases are accepted!!
this is my code:
isValid(s) {
let par = {
'}':'{',
']':'[',
')':'('
}
for(let p of s){
if(p == par){
return false;
}else{
return true;
}
}
}
Metadata
Metadata
Assignees
Labels
No labels