Searchable Dispensers Flashcards
1
Q
What is a searcable dispenser?
A
A dispenser that allows you to examine items beyond the current item and provides some control over cursor positioning through searching.
2
Q
What will occur with a successful search? (Using the search method)
A
makes the searched item the current item
3
Q
What is an Ordered Binary Tree (BST)
A
A binary tree with a specific ordering property for every node
4
Q
What is the ordering property of BST?
A
- Elements in the left subtree of a node are strictly less than the element at the node.
- Elements in the right subtree of a node are greater than or equal to the element at the node.
5
Q
Why are BSTs suitable for searchable dispensers?
A
They allow insertion and removal of items (like dispensers) and enable searching for items (like searchable containers)