Question d’entretien chez Citadel Securities

Two leetcode medium questions, pretty standard