diff --git a/Arrays/validParentheses.cpp b/Arrays/validParentheses.cpp new file mode 100644 index 0000000..b393212 --- /dev/null +++ b/Arrays/validParentheses.cpp @@ -0,0 +1,25 @@ +class Solution { +public: + bool isValid(string s) { + if(s.size() == 1){ + return false; + } + stack st; + for(int i=0; i