Question d’entretien chez Amazon

Two leetcode medium questions that used multiple data structres.