Question d’entretien chez Intel Corporation

question from leetcode, not hard