Font size
WorksheetsOCR Search and Sorting
Total questions: 40
Worksheet time: 28mins
while searchIndex < _______(searchList)
What is the missing command to check how big the list is?
input
len
div
Which algorithm splits the arrays into sub-arrays of 1 element.
Binary search
Linear Search
Merge sort
Insertions sort
Bubble sort
In which of the following cases, binary search algorithm is used?
To search an element in an unordered list.
To search an element in a list of few elements.
To search an element in any ordered list with large number of elements.
How does a binary search algorithm works?
Dividing the list into halves until the item is matched with one in the list.
Starts with the first element and checks the next element consecutively until a match is found.
None of the above
An array with 32 elements is input to a binary search algorithm. How many maximum number of comparisons are performed?
32
16
8
5
Complete the sentence: The lower half of the list is discarded if the value at midpoint is …………………….. item searched.
less than
greater than
equal to
what's the next line of merge sort? no spaces, only commas
(a)
what's the subsequent line of merge sort? no spaces, only commas
(a)
during the first comparison of the final stage, the two numbers compared are 1 and _
2
4
1
3
What is abstraction?
The process of filtering out unnecessary detail
The process of filtering out irrelevant characteristics
The process of filtering out irrelevant characteristics and unnecessary detail
What is decomposition?
Breaking down a complex problem or system into smaller, more manageable parts
Adding detail to make a problem more complex
When you ignore the unnecessary detail in a problem
Why do we decompose a complex problem?
To make it more difficult to solve
To change the problem we have
To make it easier to solve
Which of these is an example of decomposition?
Watching a mechanic repair a bicycle
Looking at different bicycles for similarities between them
Finding out how a bicycle works by looking in detail at the different parts that make up the bicycle
Which of these would NOT be involved in decomposing a problem?
Thinking about how the problem could be divided into smaller parts
Working out who could help you solve a part of the problem
Adding more parts to the problem so it becomes more complex
How would you describe this pattern's rule? 16, 11, 6, 1
Add 5
Subtract 3
Subtract 5
Subtract 6
