Modified the balancedParenthesis and added balancedSymbols using the same Stack data structure