Find All Possible Recipes from Given Supplies

Try to solve the Find All Possible Recipes from Given Supplies problem.

We'll cover the following

Statement

A list of recipes a chef can prepare from the supplied items is given. Ingredients required to prepare a recipe are mentioned in the ingredients list. The $i_{th}$ recipe has the name $recipes_{i}$, and you can create it if you have all the needed ingredients from the $ingredients_{i}$ list. A recipe may be listed as an ingredient in a different recipe. For example, the input may specify that custard is an ingredient in a trifle recipe or that trifle is an ingredient in a custard recipe.

Identify which recipes a chef can prepare from the given ingredients from the supplies list.

Note: It is also considered valid input for two recipes to list each other in their ingredients. For example, the input may specify that custard is an ingredient in a trifle recipe and also that trifle is an ingredient in a custard recipe. Of course, if those are the only two recipes provided in the input, the expected output is an empty list.

Constraints:

• $n ==$ recipes.length $==$ ingredients.length
• $1 \leq$ n $\leq 100$
• $1 \leq$ ingredients[i].length, supplies.length $\leq 100$
• $1 \leq$ recipes[i].length, ingredients[i][j].length, supplies[k].length $\leq 10$
• recipes[i], ingredients[i][j], and supplies[k] consist only of lowercase English letters.
• All the combined values of recipes and supplies are unique.
• Each ingredients[i] doesnâ€™t contain any duplicate values.