Pergunta de entrevista da empresa Motadata

tree based question and other one is map based.