Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Algorithm Intro

Total questions: 23

Worksheet time: 12mins

Name
Class
Date
1.

The specific steps used to complete a computation is called ___

a)

an algorithm

b)

algebra

c)

an equation

d)

a polymath

2.

Some algorithms are better than others even if they ___

a)

have logical errors

b)

have syntax errors

c)

produce equal results

d)

produce different results

3.

Generally, an algorithm is better if it takes ___

a)

more memory to compute

b)

longer to compute

c)

fewer steps to compute

d)

more steps to compute

4.

The term algorithm comes from a Persian polymath who was one of the fathers of ___

a)

calculus

b)

algebra

c)

trigonometry

d)

geometry

5.

One of the most storied algorithmic problems in all of computer science is ___

a)

counting

b)

sorting

c)

multiplication

d)

hangman

6.

Computer Scientists have spent decades inventing algorithms for sorting, with cool names like ___

a)

Lather Sort and Fettuccine Sort

b)

Foam Sort and Ravioli Sort

c)

Froth Sort and Macaroni Sort

d)

Bubble Sort and Spaghetti Sort

7.

A series of items of the same type, like airfare prices, is called ___

a)

a scalar

b)

an array

c)

a grid

d)

a table

8.

The algorithm that sorted an array by repeatedly finding the smallest element was called ___

a)

Bubble Sort

b)

Spaghetti Sort

c)

Selection Sort

d)

Merge Sort

9.

The relationship of input size to the number of steps the algorithm takes to run characterizes the ___

a)

simplicity of the algorithm

b)

complexity of the algorithm

c)

integrity of the algorithm

d)

clarity of the algorithm

10.

Which notation is used in Computer Science to describe the performance or complexity of an algorithm?

a)

N-squared Notation

b)

Big O Notation

c)

Standard Notation

d)

Scientific Notation

11.

In the Selection Sort algorithm, increasing the array from 8 to 80 items increases the running time by a factor of ___

a)

10

b)

80

c)

100

d)

800

12.

The second sorting algorithm, which started by dividing the input array in two halves, is called ___

a)

Bubble Sort

b)

Merge Sort

c)

Heap Sort

d)

Selection Sort

13.

In every loop of Merge Sort, we start with two arrays, each individually sorted, and merge them into ___

a)

smaller unsorted arrays

b)

smaller sorted arrays

c)

a larger unsorted array

d)

a larger sorted array

14.

The “Big O” computational complexity of Merge Sort is ___

a)

log (n2)

b)

(log n)2

c)

n2

d)

n (log n)

15.

Compared to the efficiency of Selection Sort, Merge Sort is ___

a)

much less efficient

b)

slightly less efficient

c)

slightly more efficient

d)

much more efficient

16.

In the "graph search" algorithmic problem, a graph is a network of nodes connected by ___

a)

lines

b)

arrows

c)

curves

d)

circles

17.

In the "graph search" algorithmic problem, each line is labeled with ___

a)

a direction

b)

a speed or velocity

c)

a distance

d)

a cost or weight

18.

In a graph search, trying every single path exhaustively and calculating the total cost of each is called ___

a)

the "brute force" approach

b)

the "straightforward" method

c)

the "strong arm" algorithm

d)

the "novice" technique

19.

Who invented the classic algorithmic solution to the graph problem?

a)

Alan Turing

b)

Tim Berners-Lee

c)

Edsger Dijkstra

d)

Sergey Brin

20.

Dijkstra's algorithm always starts with ___

a)

the line with the shortest length

b)

the node with lowest cost

c)

the most Southerly point

d)

the central node

21.

Dijkstra's original "graph search" algorithm was conceived in what year?

a)

1946

b)

1956

c)

1966

d)

1976

22.

Dijkstra's original 1956 algorithm, where n is the number of nodes, had a complexity of ___

a)

n2

b)

n (log n)

c)

log (n2)

d)

(log n)2

23.

Every time you use a service like Google Maps to find directions, which kind of algorithm is running?

a)

a "brute force" algorithm

b)

a Selection Sort of speed limits

c)

a "graph search", much like Dijkstra's

d)

a Merge Sort of route numbers