Turtle/Recursion/Iterative
Time Complexity
Classes/Lists/Greedy Algorithms
Trees
Sorting
100
The argument taken in by the left and right commands is a measurement in these.
What are degrees?
100
These are the 4 fastest time complexities.
What are O(1), O(logN), O(N), O(NlogN)
100
When using rit_object with a class, you need both __Slots__ and this
What is types?
100
If h = the height of the tree, the tree has this many leaves.
What is 2^h
100
Python has a built in sort function, this is the syntax for it.
What is lst.sort() or sorted(lst)?
200
The python circle command draws in this direction.
What is counter-clockwise?
200
Any operations with linked lists are this time complexity.
What is O(N)?
200
Do greedy algorithms always choose the best solution?
What is No?
200
A tree is considered complete if this is the case.
What is the leaves are all within 1 depth of each other?
200
Perform insertion sort on the list [5, 4, 3, 2, 1].
[4, 5, 3, 2, 1] [3, 4, 5, 2, 1] [2, 3, 4, 5, 1] [1, 2, 3, 4, 5]
300
In order to stop a recursive function from recursing infinitely we need this.
What is a base case?
300
Binary Search is this time complexity.
What is O(logN)?
300
Queues are First in First out while stacks are this.
What is first in last out?
300
Explain the process of one iteration of heap sort.
What is the root is removed, the last item in the heap is moved to the root and then sifted down.
300
What is the time complexity of Bubble Sort?
What is O(N^2)?
400
The main body of a recursive function is replaced by this in an iterative function.
What is a while loop?
400
Quick Sort and Merge Sort both have this average time complexity.
What is O(NlogN)?
400
Nodes are made up of two parts, ____ and ____.
What are data and next?
400
What is the inorder traversal of the binary tree on the board?
What is 3,4,5,6,7,8,9?
400
Perform merge sort on the list: [3, 4, 5, 2, 1].
[3, 5, 1] [4, 2] [3, 1] [5] [4, 2] [3] [1] [5] [4] [2] [1, 3] [5] [2, 4] [1,3, 5] [ 2, 4] [1, 2, 3, 4, 5]
500
The base case of a recursive function is replaced by this in an iterative function.
What is the parameter in the while loop?
500
This time complexity corresponds to the number of nested loops that elements of a list have the potential of going through.
What is exponential time?
500
A queue class has these three slots.
What are front, back, and size?
500
These are the orderings of preorder, inorder, and postorder
What are data, left ,right, left,data,right, and left, right, data?
500
Perform quicksort on the list: [3, 4, 5, 2, 1].
[2, 1] [3] [4, 5] [1] [2] [] [3] [] [4] [5] [] [1] [] [2] [] [3] [] [4] [] [5] [] [1, 2, 3, 4, 5]