Lesson details

Key learning points

  1. In this lesson, we will explore the final sorting algorithm in this unit: merge sort. We will start by considering how we might go about combining two groups of sorted items into one sorted group before being taken through the steps of one merge of a merge sort.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

9 Questions

Q1.
'A more efficient version of bubble sort uses a variable to flag when a swap was made during a single pass'
False
Correct answer: True
Q2.
'The insertion sort algorithm copies the value to be inserted in a variable at the end of each pass'
Correct answer: False
True
Q3.
'During a pass of an insertion sort, elements in the sorted part of the list are copied into the next position, to make space for the value to be inserted'
False
Correct answer: True
Q4.
Two improvements to the bubble sort algorithm are reducing the number of comparisons after each pass, and stopping once no swaps are made during a single pass.
False
Correct answer: True
Q5.
"Bubble sort compares items next to each other in the list and swaps them if they are in the wrong order."
False
Correct answer: True
Q6.
"Insertion sort compares an item from the unsorted sublist with the items in the sorted sublist and places it in the correct position."
False
Correct answer: True
Q7.
"Bubble sort is good at sorting large collections of unordered data."
Correct answer: False
True
Q8.
"Bubble sort can be really fast at sorting data that is nearly in order."
False
Correct answer: True
Q9.
"Insertion sort is usually slower to execute than bubble sort on large, unordered data sets."
Correct answer: False
True

8 Questions

Q1.
'The merge sort algorithm has two parts: splitting items and merging items'
False
Correct answer: True
Q2.
The first part of a merge sort it to repeatedly split a list in half until all the elements are in a list by themselves.
False
Correct answer: True
Q3.
Each stage of the merge sort algorithm can be shown in two parts: splitting the items and merging pairs of lists.
False
Correct answer: True
Q4.
The merge sort algorithm is less complex to implement than bubble sort.
Correct answer: False
True
Q5.
The advantage to merge sort is that it requires more memory, often due to the new lists that need to be created.
Correct answer: False
True
Q6.
"Executing a merge sort takes up extra space in memory, as new lists are made each time a list is split or two lists are combined."
False
Correct answer: True
Q7.
"A merge sort algorithm is usually slower to execute but more easier to write than bubble sort."
Correct answer: False
True
Q8.
"Merge sort is an efficient divide and conquer algorithm that can perform well in real-world use."
False
Correct answer: True

Lesson appears in

UnitComputing / Algorithms

Computing