CS Edexcel 1.2c - Linear and Binary Search

CS Edexcel 1.2c - Linear and Binary Search

9th - 10th Grade

10 Qs

quiz-placeholder

Similar activities

LINEAR SEARCH DAN BINARY SEARCH

LINEAR SEARCH DAN BINARY SEARCH

9th Grade

14 Qs

Searching Algorithms

Searching Algorithms

9th - 10th Grade

15 Qs

Common Algorithms Quiz

Common Algorithms Quiz

KG - Professional Development

11 Qs

Code.org - Unit 6 Review

Code.org - Unit 6 Review

9th - 12th Grade

15 Qs

ASK Ting 3: Pentaksiran Bab 3 (BTeks - Objektif)

ASK Ting 3: Pentaksiran Bab 3 (BTeks - Objektif)

9th Grade

10 Qs

ASK Tingkatan 3

ASK Tingkatan 3

9th Grade

15 Qs

AQA Computer Science GCSE - 3.1 Fundamentals of algorithms

AQA Computer Science GCSE - 3.1 Fundamentals of algorithms

10th - 12th Grade

15 Qs

Common Algorithms -  Bitesize

Common Algorithms - Bitesize

KG - 11th Grade

10 Qs

CS Edexcel 1.2c - Linear and Binary Search

CS Edexcel 1.2c - Linear and Binary Search

Assessment

Quiz

Computers

9th - 10th Grade

Hard

Created by

Stuart Smith

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main characteristic of a linear search algorithm?
It checks each item one by one until it finds a match.
It requires the data to be sorted before searching.
It always finds the item in the middle of the data set.
It divides the data set into halves repeatedly.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What must be true about the data set for a binary search to work?
It must have a maximum of 10 items.
It must be ordered.
It must contain only numbers.
It must be unsorted.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which search algorithm is more efficient for large data sets?
Linear search
Binary search
Both are equally efficient
Neither is efficient

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a linear search, what happens if the item is not found by the end of the data set?
It automatically switches to a binary search.
The algorithm starts over from the beginning.
The algorithm stops and indicates the item was not found.
The search continues indefinitely.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When performing a binary search, what do you do if the middle item is higher than the search item?
You swap the positions of the items.
You start a linear search from that point.
You discard the upper half of the data set.
You discard the lower half of the data set.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does a binary search determine which half of the data to search next?
By reversing the order of the data set.
By randomly selecting an index to check.
By comparing the search item with the middle item.
By checking the first item of the array.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a key advantage of using a binary search over a linear search?
It uses less memory.
It can find items faster in a sorted data set.
It works with unsorted data sets.
It is easier to implement.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?