Midterm Review Flashcards
(6 cards)
What is a binary search tree?
A node based data structure. Looks a bit like a flow chart, except the bigger numbers are usually on the right side.
How is a binary search function done?
Usually by a recursive function. If the root node key is null, then what we are looking for does not exist.
How is binary insertion done?
We do the same thing as a search function, except if a node is null, there are loops to determine which node the data goes to.
How is binary deletion done?
If there is a node with no children, it’s simply removed. If there is a node with one child, the node is deleted and replaced with its child. If there is a node with two children, delete it base upon its children
What is a heap?
It is a set of data that is placed in an array
How is heap sort done?
The information is moved to a sorted and unsorted region of the array.