or dictionary of events we are interested in.

For example, in this case,

our dictionary of events are labeled from A to Z.

Essentially, basically as you can see here,

each and every node in

my trie data structure essentially has its decision parameters R events.

So, how is the data organized in the trie data structure? Let's see an example.

So, let's assume that in our database we have the sequence car,

and I want to basically support prefix search efficiently for this sequence.

When I index this in my trie data structure,

effectively, what I need to do is,

I need to basically put it in a place in my trie data structure,

such that the string can be

found by following the event sequence.

In this case, for example,

if I start at event C for all of the pointers then,

follow the pointer A, I will find car.

That's great. What about cathy?

This is another sequence that I have in my database.

As you can see here,

cathy can be formed by starting from event C,

following the corresponding pointers,

arriving to symbol or event A,

and following the corresponding pointers,

and then following event or symbol T,

and cathy is located at this point.

So, this is essentially a data structure where if I am trying to find cathy,

I can basically decide the edges that I should be following very efficiently.

So, how do we organize or how to organize the data here?

Note that, why did I basically- So when I'm putting car and so for cathy,

I had to basically create,

I had to follow a path of two edges,

followed by another look up.

Whereas for car, I had to follow only one pointer followed by a database look up.

Now, so what is the difference?

What exactly is the difference between cathy and car in this case?

So, this is really easy and basically I think it is quite easy to see.

So, in our database,

we have car, cathy,

and in this example cattle.

Note that, here in these,

if you take a look at the these three strings,

you'll see that car,

cathy, and cattle share C and A.

So, they basically all have the same prefix.

On the other hand, car has an R as the next symbol,

but as cathy and cattle,

share yet another symbol T. So, what does this mean?

This means that if I am basically trying to find,

in this case car,