Design a digital recipe book that supports creating, reading, updating, and deleting recipes. Each recipe has a unique name, an ordered list of ingredients, and an ordered list of preparation steps.
Implement the RecipeManager class:
-
RecipeManager()Initializes an empty recipe store. -
String addRecipe(String name, List<String> ingredients, List<String> steps)Adds a new recipe. Thenamemust be unique across all stored recipes (case-insensitive).- Returns the assigned
recipeId(formatted as"recipe1","recipe2", etc., assigned sequentially starting from1). IDs are never reused after deletion. - Returns an empty string
""if a recipe with the samenamealready exists (case-insensitive).
- Returns the assigned
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected