I am trying to create a data structure that allows me to efficiently retrieve records from parts of their contents.
Let's say I'm looking for a record that matches this: [x 2 3 xx]
If [0 2 3 4 5 ]or [3 2 3 7 8 ]are in my data structure, they must be returned by the search function.
I wrote such a data structure, where I compare the "template" with all the elements of the data structure, but, of course, it takes too much time. I have few ideas on how to do this faster, but they are pretty hard to implement. Does something like this already exist? If not, how would you do it?
source
share