Lecture 1 - Tries Flashcards

1
Q

Are binary search trees comparison based?

A

Yes, as at each node you have to pick a branch based on the size of the target.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are tries?

A

Trees with each node having a key value that is added to the sequence collected when traversing the structure, so at each node there is a mutliway decision to be made.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are tries especially useful for?

A

Storing trees.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Tries complexity?

A

The complexity is almost independent of number of items, it is essentially linear.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can we implement tries?

A

Using LLs or arrays. There is a space-time tradeoff between the two.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly