Pergunta de entrevista da empresa Nextdoor

Basic algorithm based problems, nothing complicated