u3 Flashcards Preview

m269 > u3 > Flashcards

Flashcards in u3 Deck (7)
Loading flashcards...
1

The three laws of recursion:

•A recursive algorithm must have a base case.
•A recursive algorithm must change its state and move towards the base case.
•A recursive algorithm must call itself

2

binary tree

a tree in which each node has a maximum of two children and each child of a node is designated as the left or right child

3

Preorder

root, then left subtree,then right subtree.

4

Inorder:

left subtree, then root, then right subtree.

5

complete binary tree

a binary tree in which all parents have two children, except for the parents of children at the bottom level of the tree. At the bottom level, all nodes must be as far to the left as possible.

6

binary heap

a complete binary tree with an ordering rule (the heap order property) which states that parent nodes are either less than or equal to their children (a min heap) or greater than or equal to their children (a maxheap).

7

Heapifying

the process of creating a binary heap from a list.Heapifying is possible in O(n) time.