Test 1 Flashcards
O(n)
denotes that the function has the same or lower rate of growth than n
Ω(n)
denotes that the function has the same or quicker rate of growth than n
Θ(n)
denotes that the function has the same rate of growth as n
stack-empty complexity
O(1)
stack push complexity
O(1)
stack pop complexity
O(1)
enqueue complexity
O(1)
dequeue complexity
O(1)
list-search
O(n)
list-insert
O(1)
list-delete
O(1)
root
top element of the tree; element with no parents
external node; leaf
a node with no children
internal node
a node with at least one child
tree depth
distance from root to a node
tree height
distance from root to lowest node
preorder, postorder, or inorder traversal complexity
O(n)
preorder traversal
traversal in which a node is visited before its descendants
postorder traversal
traversal in which a node is visited after its descendants
inorder traversal
traversal in which a node is visited after its left subtree and before its right subtree
euler tour traversal
a traversal that walks around the entire tree and has preorder, postorder, and inorder traversal as special cases.
insertion sort average performance
O(n^2)
quick sort average performance
O(n log(n))
merge sort average performance
O(n log(n))