
Sheel P. answered 11/05/22
Software Engineer at Amazon with 4+ years of experience
There are numerous ways you can approach this problem. For me personally while using Python, I would find a dictionary convenient for this problem since it can store mappings of multi-dimensional data and keep track of the total of bread size, type of each bread, and each filling well.
NOTE: If you prefer to approach the problem yourself, try looking into dictionaries and see how you can potentially use that to store your data and don't read further - since below I've given you an example solution.
Feel free to message me or schedule a lesson if you want to learn more or if you have further questions!
Here's one way you can structure it in Python: