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.
1Define1 mark
2026
Define what Big O notation describes.
Markscheme and model answer locked
Unlock Question2Determine2 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 Question3State2 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 Question4Determine2 marks
2026
Determine how the time taken by an O(n squared) algorithm changes when the input triples.
Markscheme and model answer locked
Unlock Question5Determine2 marks
2026
Determine the maximum comparisons binary search needs on a list of one million items.
Markscheme and model answer locked
Unlock Question6Explain3 marks
2026
Explain why the inner loop of a bubble sort can stop one position earlier on each pass.
Markscheme and model answer locked
Unlock Question7Construct4 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 Question8Explain4 marks
2026
Explain why space complexity matters as well as time complexity.
Markscheme and model answer locked
Unlock Question9Construct4 marks
2026
Write a Python program that performs a selection sort on a list called values.
Markscheme and model answer locked
Unlock Question10Outline3 marks
2026
Outline how a binary search works.
Markscheme and model answer locked
Unlock Question11Explain3 marks
2026
Explain why the midpoint should be calculated as low + (high − low) DIV 2 in some languages.
Markscheme and model answer locked
Unlock Question12Choose1 mark
2026
Choose the requirement binary search places on the data.
Markscheme and model answer locked
Unlock Question13State2 marks
2026
State the Big O complexity of linear search and of binary search.
Markscheme and model answer locked
Unlock Question14Determine2 marks
2026
Determine how many extra comparisons binary search needs if that list grows to two million.
Markscheme and model answer locked
Unlock Question15Construct4 marks
2026
Write a Python function for a binary search on a sorted list, returning the index of the target or -1 if it is absent.
Markscheme and model answer locked
Unlock Question16Determine2 marks
2026
Determine the list after one complete pass of a selection sort on [5, 2, 9, 1].
Markscheme and model answer locked
Unlock Question17Determine1 mark
2026
Determine the Big O complexity of a single loop over an array of n elements.
Markscheme and model answer locked
Unlock Question18Suggest4 marks
2026
Suggest when a linear search is the better choice despite its worse complexity.
Markscheme and model answer locked
Unlock Question19Determine3 marks
2026
Determine the total cost of sorting a list of n items and then binary searching it once, compared with a single linear search.
Markscheme and model answer locked
Unlock Question20Choose1 mark
2026
Choose the complexity of binary search on a sorted 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