Nextdoor interview question

Basic algorithm based problems, nothing complicated