Find All Possible Recipes from Given Supplies

Medium · Graphs · about 25 minutes

Asked at Amazon, Google, Meta, Microsoft.

recipes[i] can be made from all of ingredients[i]. Ingredients can be other recipes. You start with infinite supplies. Return every recipe you can make, in any order.

Related guides