Check balanced parentheses with multiple bracket types | Snowflake Interview Question