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.
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.
3
Q
What are tries especially useful for?
A
Storing trees.
4
Q
Tries complexity?
A
The complexity is almost independent of number of items, it is essentially linear.
5
Q
How can we implement tries?
A
Using LLs or arrays. There is a space-time tradeoff between the two.