Hello Kalan, This is a late proposal, but still a very interesting goal. I wonder however about how you expect to perform it.
What kind of structure would you use for in-memory storage of the categories? How do you perform intersection in that? How do you update them? (ie. category insertion/deletion)
Do you have a rough estimate of the complexity order of each of those operations?
I agree it's a good challenge, and I'm happy that you're excited with that, but I'm afraid that it might be too hard to actually accomplish. Or it may be doable, but needing several compromises.