Abstract Data Type(ADT) is a collection of data and associated subprograms/methods stored as a single module. Function: An ADT enables you to interact with a data structure without having to know how the data structure is implemented and how it functions
Breadth first traversal: Proceed horizontally from the root to all of its children then to its children’s children and so on until all nodes have been processed. To implement this traversal a queue is used
Insert, in the order given, the following numbers into an initially empty Binary Search Tree (BST): 6, 2, 5, 1, 7, 9, 3, 8, 4
Depth First Traversal: Proceed along a path from the root through one child to the most distant descendant of that first child before processing the second child To implement this traversal a stack is used
Describe a data structure. Give an example of a data structure
A Data Structure consists of 2parts: Collection of elements each of which is either a data type or another data structure and A set of associations or relationships (the structure) involving the collection of elements.eg. Array, Linked List, Binary Tree