time limit exceeded in 4 out of 5 test cases.
TLE in Brackets all over
Hi @vivek21,
I hope you have understood the question. You can use Dynamic Programming in this problem. Simple implementation will give you TLE. For a start you can think of how many sequences of brackets give a valid sequence.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.