I have written the logic to check for parenthesis for \"(\" and \")\" but there seems to an issue when parenthesis gets mixed. This is because I\'m just comparing the total pare