A binary search tree (BST) is a binary tree where each node has a comparable key. As with any tree, nodes may optionally contain satellite data.
A BST can support many dynamic container operations, including search, minimum, maximum, predecessor, successor, insert and delete. The defining feature of a BST is that keys are maintained in an ordered fashion. This makes a BST a useful data structure for implementing such things as ordered sets and bags.
A bag is a container of non-unique items. Bags are defined by the following operations Length, Add, Delete and Find. Bags often also need to support FindAll.
Bags can be ordered or un-ordered. This post will be discussing un-ordered bags.
A queue is a container that supports retrieval by first-in, first-out (FIFO) order. The get and put operations for a queue are usually called enqueue and dequeue, other operations may include isEmpty. A full description of queues can be found online here.
Queue’s minimise the maximum time spent waiting, however the average wait time will be the same whether a LIFO or a FIFO is used.
According to Apprenticeship Patterns by Bavid H. Hoover and Adewale Oshineye, in order to become a journeyman one must learn to explain their craft to others. This is one apprentices effort to learn these skills.