Google Onsite

Write a function that will give you a list of recipes you can prepare with a given list of ingredients.

eg: to prepare BREAD, you need Flour and Yeast
Intermediate Ingredient: NONE

Ham and Cheese
Raw Ingredients: Ham, Cheese
Intermediate Ingredient: BREAD

Caprese Salad: Mozzrela, Tomatoes
Intermediate Ingredient: NONE

if you have Ham, Cheese, Flour, Yeast - your function should return BREAD and HaM and Cheese. Create, write your own data structire, function signature.

This is the data structure I used-

class Recipe{
List rawIngredients;
List intermediateRecipes;
}

class Ingredient{
String name;
}

public List findRecipe(List ingredientList){

}

Comments (16)