From 5537728d371690c9085fd091296279a1a0fd0b81 Mon Sep 17 00:00:00 2001 From: ShiwaniBoipai <105618782+ShiwaniBoipai@users.noreply.github.com> Date: Mon, 31 Oct 2022 10:20:56 -0700 Subject: [PATCH] Balanced Parenthesis --- BalancedParenthesis.cpp | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 BalancedParenthesis.cpp diff --git a/BalancedParenthesis.cpp b/BalancedParenthesis.cpp new file mode 100644 index 0000000..1ea93b7 --- /dev/null +++ b/BalancedParenthesis.cpp @@ -0,0 +1,48 @@ +#include +using namespace std; +bool isBalanced(string s,int n) +{ + stack st; + char c; + for(int i=0;i>s; + if(isBalanced(s,s.size())) + cout<<"Balanced paranthesis"<