Question d’entretien chez Applied Intuition

Medium leetcode style questions + how would you design this algorithm