Structure Basics
Operations and Methods
Real-World Applications
Oh no! Code!
Think like a Computer
100

This data structure stores key-value pairs for fast lookup.

What is a map (or dictionary)?

100

The method used to add an item to a set in Python.

What is add()?

100

A priority queue is commonly used in this algorithm for finding the shortest path.

What is Dijkstra’s algorithm?

100

myset = {1, 2, 3, 3} → What will len(myset) return?

What is 3?

100

When you search for a value in a dictionary, Python uses this structure under the hood.

What is a hash table?

200

A set automatically removes these from its collection.

What are duplicates?

200

This method returns all the keys of a dictionary.

What is keys()?

200

A set would be useful in checking this kind of condition in data — for example, duplicate usernames.

What is uniqueness?

200

If we have the variables A = {1, 2, 3} and B = {2, 3, 4}, what does A - B return?

What is {1}?

200

In a max-heap, swapping continues upward until this condition fails.

What is the parent is greater than or equal to the child?

300

A heap is most often implemented using this underlying data structure.

What is an array or list?

300

The dictionary method that removes a key and returns its value.

What is pop()?

300

Heaps are often used to implement this data structure for handling priorities.

What is a priority queue?

300

students = {'A01': 'Mia', 'A02': 'John', 'A03':'Chris', 'A04':'Steve', 'A04':'James'} → What does students['A02'] return?

What is 'John'?

300

If a dictionary uses student IDs as keys and names as values, which is unique — the keys or the values?

What are keys?

400

The process of maintaining heap order after insertion or deletion.

What is heapify?

400

The set operation that combines all unique elements from two sets.

What is union()?

400

The process of moving an element up the heap until the property is restored.

What is bubble-up (or heapify-up)?

400

A = {1, 2, 3}; B = {3, 4, 5}; print(A & B) → Output?

What is {3}?

400

In a priority queue, tasks with higher priority numbers might come first — what type of heap is used for this?

What is max-heap?

500

This type of heap keeps the largest element at the root, unlike a min-heap.

What is max-heap?

500

In a priority queue, this operation always removes the element with the highest or lowest priority.

What is dequeue() or pop()?

500

A min-heap could be used by an operating system to decide which process to run next based on this property.

What is lowest priority value or shortest job?

500

A = {2, 4, 6, 8}
B = {4, 8, 12}
C = {8, 16}

result = (A | B) - (B & C)
print(sum(result))

This value will be printed as the output of this code.

What is 28?

500

If two keys in a dictionary are the same, what happens to the first value?

What is it gets overwritten?

M
e
n
u