wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Common Algorithms

Total questions: 25

Worksheet time: 18mins

Name
Class
Date
1.

A linear search does not need your data set to be (a)   .

2.

When is a linear search a good algorithm to use?

a)

If your data set is very large

b)

If your data set is sorted in order

c)

If your data set is small

d)

If your data set is made up of irrational numbers

3.

When would you get a best case scenario for a linear search?

a)

When your data set is small

b)

When your data set is large

c)

When your search item is near the beginning of the list

d)

When the search item is in the middle of the list

4.

When would you get the best case scenario for a binary search?

a)

When your list is small

b)

When your list is unsorted

c)

When your search item is in the beginning of the list

d)

When your search item is exactly in the middle of the list

5.

Which of these statements is true for binary search?

a)

It looks at each data item in order sequentially

b)

It is very good if your data set is very small

c)

It requires your data set to be sorted

d)

It only works if your data set is made out of 0s and 1s

6.

Which of these is a disadvantage of linear search?

a)

It does not work on unsorted data sets

b)

It is very inefficient on large data sets

c)

It is very time consuming on small data sets

d)

It requires twice as much memory as binary search

7.

What is the worst case scenario for a linear search?

a)

When the data set is large and your search item is in the middle of the list

b)

When the data set is small and the search item is at the beginning of the list

c)

When the data set is made up of curved geometric shapes

-OWEN D

d)

When the data set is large and the search item is at the end of the list

8.

Linear search will work on (a)   lists.

9.

Which of these is true for binary search algorithms

a)

It can be used to traverse a binary tree graph

b)

It works only on sorted data

c)

It is efficient for large data sets

d)

It is a divide and conquer algorithm

10.

Linear search algorithm

a)

is inefficient on large data sets

b)

can be used on unsorted data

c)

Requires the data set to be already sorted

d)

Does not work quadratic equations

11.

Which of the following is/ are common algorithms?

a)

Merge cells

b)

Merge search

c)

Merge sort

d)

Merge lanes

12.

Which of these sorting algorithms is the least efficient?

a)

Bubble Sort

b)

Binary Sort

c)

Merge Sort

d)

Motivational Sort

13.

Which of these sorting algorithms is the most efficient on large data sets?

a)

Bubble Sort

b)

Linear Sort

c)

Merge Sort

d)

Allsorts

14.

Which algorithm has a similar time efficiency as merge sort?

a)

Bubble Sort

b)

Quick Sort

c)

Insertion sort

d)

Exertion sort

15.

Which sorting algorithm has a similar time efficiency as Bubble sort?

a)

Quick Sort

b)

Merge Sort

c)

Insertion Sort

d)

Exertion Sort

16.

Insertion sort is most useful for

a)

Inserting items into a large sorted data set

b)

inserting items into a large unsorted data set

c)

inserting items into a small unsorted data set

d)

inserting items into a small sorted data set

17.

Which algorithm requires extra memory?

a)

Bubble sort

b)

Quick sort

c)

Merge sort

d)

Insertion sort

18.

Which algorithm first splits a list up into smaller sub-lists?

a)

Bubble Sort

b)

Quick Sort

c)

Merge Sort

d)

Insertion Sort

19.

Which algorithm can make use of effciencies provided by having multiple cores?

a)

Binary Search

b)

Linear Search

c)

Merge Sort

d)

Bubble Sort

20.

Which of these data structures can be traversed by a binary search?

a)

Hash Table

b)

Stack

c)

Queue

d)

Tree

21.

The time complexity of merge sort is (a)  

22.

What is the space complexity of Merge sort?

a)

O(n)

b)

O(1)

c)

O(n!)

d)

O(nlogn)

23.

Bubble sort has a time complexity of (a)  

24.

Which of these algorithms has a time complexity of O(n squared)?

a)

Bubble Sort

b)

Linear Search

c)

Binary Search

d)

Merge Sort

25.

Draw the symbol for a NAND Logic Gate.