Pergunta de entrevista da empresa Bloomberg

Given a string containing a mathematical expression, calculate the result