Pergunta de entrevista da empresa Wix

Leetcode easy algorithm question. I also needed to write parsing for a formula or so