diff --git a/C programs/validate_paranthesis.cpp b/C programs/validate_paranthesis.cpp new file mode 100644 index 0000000..8cc6be6 --- /dev/null +++ b/C programs/validate_paranthesis.cpp @@ -0,0 +1,49 @@ +#include +#include +#include +using namespace std; + +int main() +{ + int t; + cin>>t; + int buffer = 0; + while(t--){ + stack stack; + string str; + if(buffer == 1) + getline(cin, str); + else{ + getline(cin, str); + getline(cin, str); + } + int f =1 ; + for(int i=0; i