From 3029180f454f5c14efe69100ae530a8a807672de Mon Sep 17 00:00:00 2001 From: Eshaabhasin <43770452+Eshaabhasin@users.noreply.github.com> Date: Fri, 20 Oct 2023 10:29:49 +0530 Subject: [PATCH] balanced paranthesis c++ program --- balancedparanthesis.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 balancedparanthesis.cpp diff --git a/balancedparanthesis.cpp b/balancedparanthesis.cpp new file mode 100644 index 0000000..91ac417 --- /dev/null +++ b/balancedparanthesis.cpp @@ -0,0 +1,24 @@ +#include +using namespace std; +void balancedparanthesesis(char *a,int i,int n,int open,int close){ + if(i==2*n){ + a[i]='\0'; + cout<>n; + balancedparanthesesis(a,0,n,0,0); +} \ No newline at end of file