Pergunta de entrevista da empresa Meta

Convert a string consisting of numbers and parentheses into a binary tree.