Pergunta de entrevista da empresa ShipBob

coding problem on balance parenthesis along with a variation.