In a recursive function, this is the condition that stops the recursion
What is the base case?
This simple sorting algorithm repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
What is bubble sort?
This type of binary tree ensures that each parent node is smaller than its child nodes.
What is a min heap?
This type of tree is a binary search tree with a balance condition to ensure O(log n) time complexity for insertion, deletion, and lookup.
What is an AVL tree?
This type of graph traversal visits all the vertices of a graph starting from a specific node, going as deep as possible before backtracking.
What is depth-first search (DFS)?
This common mathematical sequence, where each number is the sum of the two preceding ones, is often implemented using recursion.
What is the Fibonacci sequence?
This efficient, comparison-based, divide and conquer sorting algorithm that breaks down lists has an average time complexity of O(n log n).
What is merge sort?
The height of a binary tree with n nodes in the worst case is this.
What is n?
In a binary search tree, the left child of a node has a value less than this.
What is the parent node? (Or right child of parent?)
In a graph, the shortest path algorithm that uses a priority queue to find the shortest path from a single source to all other vertices is called this.
What is Dijkstra's algorithm?
You can have a base case, but without this law, your recursion will never end.
What is working toward the base case?
This sorting algorithm divides the list into a sorted and an unsorted region and iteratively shrinks the unsorted region by extracting the minimum element and moving it to the sorted region.
What is selection sort?
In a binary tree, the maximum number of nodes at level L is this. (Levels starting at 0.)
What is 2L?
The balance factor of an AVL tree node is calculated as this.
What is the height of left child minus the height of right child?
This is the name for a graph where each edge has a direction.
What is a directed graph (or digraph)?
When recursing, the function calls all live on this data structure.
What is a stack? (Or Call Stack)?
In quicksort, this term refers to the process of selecting an element to compare all other elements against.
What is choosing the pivot?
After deleting the minimum in a min heap, and replacing it with the last item, this function ensures the min heap property is restored.
What is percolate down?
The worst case for a BST is when it looks like this other data structure.
What is a linked list?
The space complexity of storing a graph as an adjacency matrix is this.
What is O(V2)?
The time complexity of the naive recursive implementation of the Fibonacci sequence is this.
What is O(2n)?
When choosing bad pivots, quicksort devolves to this time complexity.
What is O(n2)?
This data structure is a binary tree where each level, except possibly the last, is completely filled, and all nodes are as far left as possible.
What is a complete binary tree?
This specific type of rotation is used in AVL trees when an unbalanced node has a left child with a right-heavy subtree.
What is a left-right rotation (or double rotation)?
This data structure is commonly used to implement breadth-first search (BFS).
What is a queue?