2115. Find All Possible Recipes from Given Supplies
2115. Find All Possible Recipes from Given Supplies
Description
You have information about n
different recipes. You are given a string array recipes
and a 2D string array ingredients
. The i^th
recipe has the name recipes[i]
, and you can create it if you have all the needed ingredients from ingredients[i]
. A recipe can also be an ingredient for other recipes, i.e., ingredients[i]
may contain a string that is in recipes
.