Strings
Recursion
Sorting & Searching
Sets and Dictionaries
Trivia
100

This syntax can be used to create a new string or list from part of another

What is slicing?

100

The case that prevents an infinite loop by terminating the recursion

What is the base case?

100

These two algorithms both take O(n²) time on average

What are insertion and selection sort?

100

The ___ of a dictionary have to be unique, but the ____ don't

What are keys and values?

100

The ASCII/Unicode value for "A" (capital)

What is 65?

200

These two functions convert a character to its Unicode codepoint and vice versa.

What are ord and chr?

200

This kind of diagram shows the steps involved in evaluating a recursive function

What is an execution trace/box diagram?

200

This algorithm usually takes O(n log n) time, but can be O(n²) on some inputs

What is quicksort?

200

Retrieving values from a dictionary can usually be done in this time complexity

What is O(1)?

200

The year Python was first released

What is 1991?

300

This function removes whitespace from the beginning and end of a string

What is strip()?

300

In this kind of recursion, the last thing the function ever does is call itself

What is tail recursion?

300

This step combines two sorted lists into another sorted list

What is merging?

300

The two techniques that can be used in a hash table if a collision occurs

What are probing and chaining?

300

Python was named after this

What is Monty Python?

400

The result of "Computer"[1:-1:2]

What is "opt"?

400

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)            


What is a square spiral?
400

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?

400

Used to mark deletions in a linear probing hash table

What is a sentinel/flag value?

400

Python's built-in sorting functions use Timsort, which is based on these two algorithms

What are merge and insertion sort?

500

The result of "3+x++".split("+")

["3", "x", "", ""]

500

When a function is called, a new frame is created in this region of memory

What is the stack?

500

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²)

500

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?

500

This programming language used to use string length as its hash function

what is PHP?