I pondered this problem for some time, but so far I can’t get a good concise effective solution.
Problem:
I have a list of recipes, which is an NSArray, each recipe object contains ingredients as NSSet objects. The data are related to each other and come from coredata. Now there is another NSArray list that contains the elements (ingredients) that a particular person has.
Now I need to somehow compare the current items that the user has with the ingredients in the recipes, and recommend user recipes in the form of a table with sections, such as all items present, 1 element is missing, two elements are missing and three elements are missing.
How do you guys think that I should approach this problem. I tried a few things, but I end up losing more every time.
Any hints / pointers would be much appreciated
source
share