Hi everyone,
I want to print all possible combinations of "(" and ")" for any given number.
Let me explain it with an example.
value of n possible
patterns
n=1 ()
n=2 (()), ()()
n=3 ((())), (())() ()(()), ()()()
n=4 (((()))), ((()))() ()((())), (())(()),()()()()
there is no place for ")(" .
I need some basic approach to follow.
What in my mind is something like print(n), print(n-l)print(l) print(l)print(n-l), print(l)*n
and then i have to call it in recursive way.
I am not very sure about my way