DSs are used to organize data so that it can be accessed quickly and usefully.
egs: List, stack, queue, heap, search tree, hasttable, bloom filter, union-find etc.
Why so many? Different DSs support different sets of operations -> suitable for different types of tasks.
Rule of Thumb: Choose the minimal DS that supports all the operations that you need.
When you think about what DS to use, ask 2 questions:
egs: List, stack, queue, heap, search tree, hasttable, bloom filter, union-find etc.
Why so many? Different DSs support different sets of operations -> suitable for different types of tasks.
Rule of Thumb: Choose the minimal DS that supports all the operations that you need.
When you think about what DS to use, ask 2 questions:
- What are the operations it supports?
- What is its running time?
No comments:
Post a Comment