Domanda di colloquio di Datadog

Two leetcode medium questions for the first round.