Question d’entretien chez Citadel Securities

Two leetcode questions: medium, hard