What are the types of data structure and the access time in the best / average / worst cases?
In a list is pretty simple, I need to run through all items until I find the specific one I wanted.
What happens with facts? How do they store?
Assume I have N facts:
color(red).
color(blue).
.
.
.
color(green).
Now I’m going to ask prolog of color(green).
It should return true.
How much time it take to prolog find that fact and return the right answer?