Unit 6: B2 Programming
Topic 6.4: Algorithms and efficiency Questions
Practice 20 exam-style questions for IB Computer Science Topic 6.4. Review the question stems below, then unlock the full Question Bank to access markschemes, model answers, and AI grading.
1Outline3 marks
2017
A PE teacher's app orders pupils' heights with a selection sort. Outline the main steps involved.
Markscheme and model answer locked
Unlock Question2Explain2 marks
2015
Ten sensor readings must be put in order. Explain one reason a selection sort could need less work than a bubble sort for this.
Markscheme and model answer locked
Unlock Question3Choose1 mark
2026
Choose the requirement binary search places on the data.
Markscheme and model answer locked
Unlock Question4Choose1 mark
2026
Choose the complexity of binary search on a sorted array.
Markscheme and model answer locked
Unlock Question5Construct5 marks
2023
A list BANNED holds words a chat filter blocks. Construct a Python function is_banned(word) that returns True if word is in BANNED, without using the in operator.
Markscheme and model answer locked
Unlock Question6Define1 mark
2026
Define what Big O notation describes.
Markscheme and model answer locked
Unlock Question7Determine2 marks
2026
Determine the Big O complexity of a loop over n elements containing another loop over the same n elements.
Markscheme and model answer locked
Unlock Question8State2 marks
2026
State the Big O complexity of accessing an array element by index, and of scanning a whole array.
Markscheme and model answer locked
Unlock Question9Determine2 marks
2026
Determine how the time taken by an O(n squared) algorithm changes when the input triples.
Markscheme and model answer locked
Unlock Question10State1 mark
2027
A program compares every pupil in a class list of n pupils with every other pupil, using one loop inside another, each running n times. State the time complexity of this algorithm in Big O notation.
Markscheme and model answer locked
Unlock Question11State1 mark
2020
A linear search looks through an unsorted list of 50 names for a name that is not there. State how many comparisons it makes.
Markscheme and model answer locked
Unlock Question12State1 mark
2020
State the condition a list must meet before a binary search can be used on it.
Markscheme and model answer locked
Unlock Question13Outline2 marks
2021
A student says bubble sort and selection sort have nothing in common. Outline one similarity between them.
Markscheme and model answer locked
Unlock Question14Describe4 marks
2020
A club secretary's program puts members' names into alphabetical order with a bubble sort. Describe the steps involved.
Markscheme and model answer locked
Unlock Question15Describe4 marks
2020
A quiz app sorts players' scores with a bubble sort. Describe the steps involved.
Markscheme and model answer locked
Unlock Question16Outline2 marks
2021
A programmer must choose between a bubble sort and a selection sort for data that is often already sorted. Outline one difference that matters here.
Markscheme and model answer locked
Unlock Question17Identify2 marks
2023
A library catalogue program needs to find books by title. Identify two types of searching algorithm the programmers could use.
Markscheme and model answer locked
Unlock Question18Construct4 marks
2026
Write a Java method for a linear search that returns the index of a target, or -1 if it is absent.
Markscheme and model answer locked
Unlock Question19Construct4 marks
2026
Write a Python function for a linear search that returns the index of a target, or -1 if it is absent. Do not use the built-in index() method.
Markscheme and model answer locked
Unlock Question20State1 mark
2020
A gym stores member IDs in an array in the order members joined. State why a binary search cannot be used on this array.
Markscheme and model answer locked
Unlock QuestionReady to practice Topic 6.4?
Get instant AI feedback on your answers, view detailed markschemes, and track your progress across all IB Computer Science topics.
Start Practising Now