Pregunta de entrevista de Bkash

Parentheses problem, design a system from OOP knowledge, complexity of some algorithm