Pattern Recognition
#5medium

Restaurant Menu Allergen Grouping

A restaurant has menu items, each tagged with a set of allergens (e.g., "nuts", "dairy", "gluten"). Group all menu items that share the exact same set of allergens. Return a list of groups. For example, if "Pasta" and "Pizza" both have {"dairy", "gluten"}, they belong in the same group.

Which pattern would you use?

Foundations

Intermediate

Advanced