Unit 8: Abstract data types

Topic 8.1: Fundamentals of ADTs Questions

Practice 20 exam-style questions for IB Computer Science Topic 8.1. Review the question stems below, then unlock the full Question Bank to access markschemes, model answers, and AI grading.

1State1 mark
2026
S = {1, 4, 7, 9} and T = {4, 9, 12}. State the result of S ∩ T.
Markscheme and model answer locked
Unlock Question
2Outline2 marks
2026
A gym holds the email addresses of the members attending each class in a separate collection per class, and uses those collections to send one newsletter. Many members attend several classes. Outline how a set can be used to ensure only one email is sent to each address.
Markscheme and model answer locked
Unlock Question
3Outline4 marks
2026
A hospital ward's patient list changes size throughout the day. Outline one advantage and one disadvantage of using a linked list instead of an array for this list.
Markscheme and model answer locked
Unlock Question
4Describe4 marks
2026
An album in a photo app is held as a chain of linked nodes, one per photo, instead of a fixed-size array. Describe the advantages and disadvantages of this design.
Markscheme and model answer locked
Unlock Question
5Describe4 marks
2026
A bakery's ordering system holds the day's online orders in a linked list; a fixed-size array was the alternative. Describe the advantages and disadvantages of this choice.
Markscheme and model answer locked
Unlock Question
6Describe4 marks
2026
A project-planning tool keeps each task as a node pointing to the next task, instead of storing the tasks in a fixed-size array. Describe the advantages and disadvantages of this approach.
Markscheme and model answer locked
Unlock Question
7Construct6 marks
2026
A bus company keeps Stop objects in a Java LinkedList route. Stop has getStreet() and setStreet(String s). A street is renamed. Construct public int renameStreet(LinkedList route, String oldName, String newName) that updates every stop on oldName and returns how many stops were updated.
Markscheme and model answer locked
Unlock Question
8Construct5 marks
2027
A music app stores songs in a singly linked list; each node has title, plays and next, and self.head points at the first node. Construct a Python method print_plays(self, title) that prints the plays of the song with that title, or "not found".
Markscheme and model answer locked
Unlock Question
9Construct5 marks
2027
A music app stores songs in a singly linked list; each Node has title, plays and next, and head points at the first node. Construct a Java method printPlays(String title) that prints the plays of the song with that title, or "not found".
Markscheme and model answer locked
Unlock Question
10Describe5 marks
2027
A playlist kept in alphabetical order is stored as a singly linked list. Describe how a new song title is added so that the order is kept.
Markscheme and model answer locked
Unlock Question
11Describe5 marks
2027
Race times are kept smallest first in a singly linked list. Describe how a new time is added without breaking that order.
Markscheme and model answer locked
Unlock Question
12Sketch2 marks
2027
Fruit names were inserted into a binary search tree in this order: Mango, Fig, Plum, Apple, Lime. Sketch the tree after Kiwi and Banana are inserted.
Markscheme and model answer locked
Unlock Question
13Sketch2 marks
2027
City names were inserted into a binary search tree in this order: Oslo, Bern, Rome, Athens, Lima. Sketch the tree after Paris and Cairo are inserted.
Markscheme and model answer locked
Unlock Question
14State1 mark
2027
A set of seat numbers is {3, 8, 12, 15}. State the result of testing whether 12 is a member of the set.
Markscheme and model answer locked
Unlock Question
15Describe3 marks
2027
A travel app needs the country name for a two-letter country code such as FR. Describe how a key-value structure could be set up and used to return the name.
Markscheme and model answer locked
Unlock Question
16State1 mark
2027
Set A = {"red", "blue", "green"} and set B = {"blue", "white", "green"}. State the result of the intersection of A and B.
Markscheme and model answer locked
Unlock Question
17State2 marks
2026
Two Java HashSets are created: set1 holds 4, 7, 2, 9, 11 and set2 holds 2, 7, 5, 13. State the output after each of these statements is run: (i) System.out.println(set1.contains(5)); (ii) set1.retainAll(set2); System.out.println(set1);
Markscheme and model answer locked
Unlock Question
18Construct5 marks
2026
A quiz app stores each player's name and score in the nodes of a singly linked list, where each node has name, score and next, and self.head points at the first node. Construct the Python method look_up_player() that is passed a name, prints that player's score if the name is in the list, and prints a suitable message if it is not.
Markscheme and model answer locked
Unlock Question
19Describe5 marks
2026
A quiz app keeps the nodes of its linked list permanently in descending order of score, so it never has to sort them. A method is passed a new node holding a player's data and must insert it in the correct position. Without writing code, describe the steps in that method. Assume the list is not empty.
Markscheme and model answer locked
Unlock Question
20Sketch2 marks
2027
A singly linked list holds Ana -> Ben -> Cat -> Dan -> null. Sketch the list after the node holding Ben is deleted.
Markscheme and model answer locked
Unlock Question

Ready to practice Topic 8.1?

Get instant AI feedback on your answers, view detailed markschemes, and track your progress across all IB Computer Science topics.

Start Practising Now