Hi @Habeebah_Ajao,
In that code, all the cases are already tackled where we can add as many opening brackets as we want because we are storing these brackets in a string type. Basically, the case is to check the balanced brackets, and the case we are using for that is as follows.
Case: The check
variable will never be negative because it will imply that there are more closing brackets than opening brackets in the string.
And this case is enough to check the balanced brackets, and this case also satisfies the solution for more opening brackets.
I hope I have answered your query; please let me know if you still have any confusion.
Thank You