• Shuffle
Toggle On
Toggle Off
• Alphabetize
Toggle On
Toggle Off
• Front First
Toggle On
Toggle Off
• Both Sides
Toggle On
Toggle Off
Toggle On
Toggle Off
Front

### How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

Play button

Play button

Progress

1/18

Click to flip

### 18 Cards in this Set

• Front
• Back
 For singely linked list with a head pointer: 1. adding to the front: Big O( ? ) 2. adding to the end: Big O ( ? ) 3. remove from front: Big O ( ? ) 4. remove from end: Big O ( ? ) 1. Big O(1) 2. Big O(n) 3. Big O(1) 4. Big O(n) Binary Tree: A binary tree is an N-ary tree where N=___, and each child is considered to be either the left or the right child. 2 Binary Search Tree: - for every node X in the tree, the values of all the keys in the left subtree are __1___ than the key in X and the value of all the keys in the right subtree are ___2___ than the key in X. 1. smaller 2. larger Perfect Binary Tree: A perfect binary tree of height h>=0 is a binary tree with the following properties: 1. if h = 0, then there's only ____ node (i.e. left and right subtrees are empty) 2. otherwise (h>0), both the left and right subtrees are perfect binary trees. one, finding height n = 2^(h+1) - 1 n + 1 = 2^(h+1) log base 2 (n+1) = h + 1 (log base 2 (n+1)) - 1 = h h is in theta(log n) TREE: A node with degree zero is called a _____. leaf TREE: The _____ of a path P is k-1. length An ___1___ tree T is a finite set of nodes, where: 1. either T is ___2___ 2. or T consists of a root, r, and exactly N distinct ___3___ trees. 1. N-ary tree 2. empty 3. N-ary TREE: The ____ of a node is the length of the longest path from r to a leaf. height TREE: A ____ in a tree T is defined as a non-empty sequence of nodes. P = { R1, R2,..., Rk} Ri must be the parent of R(i+1) ALL 1<=i