Pergunta de entrevista da empresa Notion Labs

Backend coding question. More of a machine coding round.