Ad
  • Custom User Avatar

    That is true, I actually looked for an Idea (somehow I tried the most upvoted answer but for some reason, my counter didn't increased/decreased, idk why honestly lol)

    But anyways, after trying, I looked for some answer and found the same problem but more complex (with other kind of braces) and it was cool, seeing the same problem but with a stack.

  • Custom User Avatar

    Indeed, but this solution would be easily extensible to one validating nesting of different types of brackets.