Question d’entretien chez Google

two leetcode mediums, not that hard