Question d’entretien chez Noom

write a data structure for this hypothetical functionality