Task is to write function that would validate brackets, so here some examples:
"(()())", // valid
"()()", // valid
"((()())())", // valid
")((()", // invalid
"())" //invalid
"(())())" //invalid
Task is to write function that would validate brackets, so here some examples:
"(()())", // valid
"()()", // valid
"((()())())", // valid
")((()", // invalid
"())" //invalid
"(())())" //invalid