Searching and sorting algorithms

Searching and sorting algorithms

10th Grade

10 Qs

quiz-placeholder

Similar activities

Sorts and searches

Sorts and searches

1st - 12th Grade

6 Qs

PEMBANGUNAN ALGORITMA

PEMBANGUNAN ALGORITMA

9th - 11th Grade

8 Qs

Linear Search

Linear Search

10th - 12th Grade

8 Qs

Tugas TP 1 Struktur Data dan algoritma

Tugas TP 1 Struktur Data dan algoritma

10th Grade

10 Qs

REMEDIAL

REMEDIAL

10th Grade

10 Qs

Post test sorting

Post test sorting

10th Grade

10 Qs

Bubble Sort

Bubble Sort

1st Grade - Professional Development

13 Qs

OCR GCSE CS - 2.1 ERL sorts and searches

OCR GCSE CS - 2.1 ERL sorts and searches

10th - 11th Grade

9 Qs

Searching and sorting algorithms

Searching and sorting algorithms

Assessment

Quiz

Computers

10th Grade

Medium

Created by

Anthony Moran

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a necessary condition for using binary search instead of linear search?
The list must be sorted.
The list must contain unique elements.
The list must be small in size.
The list must be unsorted.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a binary search takes 3 steps to find an item in a sorted list of 8 elements, how many steps will it take for a list with 16 elements in the worst case?
5 steps
4 steps
3 steps
2 steps

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In which scenario is linear search more efficient than binary search?
When searching for multiple occurrences of an item.
When the list is unsorted.
When the list is very large.
When the list is sorted.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the list [5, 2, 9, 3, 7], how many comparisons would linear search make to find the value 7?
5 comparisons
4 comparisons
2 comparisons
3 comparisons

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What occurs during a single pass of the bubble sort algorithm?
The largest element is moved to its correct position.
The elements are sorted in descending order.
The list is divided into sub-lists.
The smallest element is moved to its correct position.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many passes would bubble sort require in the worst case to fully sort a list of 5 elements?
5 passes
2 passes
4 passes
3 passes

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the worst case, how many total comparisons would bubble sort make for a list of 6 elements?
28 comparisons
21 comparisons
36 comparisons
15 comparisons

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?