You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2115. Find All Possible Recipes from Given Supplies
4
+
5
+
You have information about n different recipes. You are given a string array recipes and a 2D string array ingredients. The ith 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.
6
+
7
+
You are also given a string array supplies containing all the ingredients that you initially have, and you have an infinite supply of all of them.
8
+
9
+
Return a list of all the recipes that you can create. You may return the answer in any order.
10
+
11
+
Note that two recipes may contain each other in their ingredients.
0 commit comments