This syntax can be used to create a new string or list from part of another
What is slicing?
The case that prevents an infinite loop by terminating the recursion
What is the base case?
These two algorithms both take O(n²) time on average
What are insertion and selection sort?
The ___ of a dictionary have to be unique, but the ____ don't
What are keys and values?
The ASCII/Unicode value for "A" (capital)
What is 65?
These two functions convert a character to its Unicode codepoint and vice versa.
What are ord and chr?
This kind of diagram shows the steps involved in evaluating a recursive function
What is an execution trace/box diagram?
This algorithm usually takes O(n log n) time, but can be O(n²) on some inputs
What is quicksort?
Retrieving values from a dictionary can usually be done in this time complexity
What is O(1)?
The year Python was first released
What is 1991?
This function removes whitespace from the beginning and end of a string
What is strip()?
In this kind of recursion, the last thing the function ever does is call itself
What is tail recursion?
This step combines two sorted lists into another sorted list
What is merging?
The two techniques that can be used in a hash table if a collision occurs
What are probing and chaining?
Python was named after this
What is Monty Python?
The result of "Computer"[1:-1:2]
What is "opt"?
This shape is drawn by the following code:
def shape(n):
if n < 5:
return
turtle.forward(n)
turtle.left(90)
shape(n/2)
shape(200) This number of comparisons would be required using binary search to find 4 in the following list: [1, 3, 4, 6, 8, 9, 12]
What is 3?
Used to mark deletions in a linear probing hash table
What is a sentinel/flag value?
Python's built-in sorting functions use Timsort, which is based on these two algorithms
What are merge and insertion sort?
The result of "3+x++".split("+")
["3", "x", "", ""]
When a function is called, a new frame is created in this region of memory
What is the stack?
The ranking of the following growth orders from fastest to slowest: O(3n), O(52), O(n²), O(10n + n log n)
What is O(52), O(3n), O(10n + n log n), O(n²)
Usually about 0.6-0.75, this value determines how full a hash table can get before it has to grow
What is a load factor?
This programming language used to use string length as its hash function
what is PHP?