From 5f99d924670fe68c03c1bb6a7c58b58f62712c97 Mon Sep 17 00:00:00 2001 From: areenoverclouds Date: Tue, 25 May 2021 23:57:36 +0530 Subject: [PATCH] Added code to check balanced paranthesis --- BalancedParanthesis.cpp | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 BalancedParanthesis.cpp diff --git a/BalancedParanthesis.cpp b/BalancedParanthesis.cpp new file mode 100644 index 0000000..b478538 --- /dev/null +++ b/BalancedParanthesis.cpp @@ -0,0 +1,53 @@ +#include +using namespace std; + +int main(){ + string s; + cout<<"Enter input paranthesis : "; + cin>>s; + stack st; + int i, res=1; + + for(i=0;i