Pergunta de entrevista da empresa Asana

What would this code do, leetcode style question