wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

KYT/CAT - Algorithms

Total questions: 33

Worksheet time: 18mins

Name
Class
Date
1.

Q.1 What common thing represents an algorithm?:

a)

[x] A cooking recipe

b)

ok

2.

Q.2 Which action is based on NP-problems?:

a)

Encryption of data

b)

ok

3.

Q.3 What are 2 advantages of a greedy algorithm?:

a)

[x] It has a reasonable complexity

b)

It is easy to implement

4.

Q.4 Which statement is correct?:

a)

dynamic programming is less efficient than divide and conquer

b)

dynamic programming is recursive

c)

dynamic programming uses the answers of previous sub problems

5.

Q.5 What is the major inconvenient of a greedy algorithm?:

a)

[x] it doesn’t always provide the globally optimum solution

b)

ok

6.

Q.6 How could we consider heuristics?

a)

[x] as shortcuts

b)

ok

7.

Q.7 Which problem is not a NP-one?:

a)

Rubik’s cube

b)

ok

8.

Q.8 When inputs are almost sorted, which statement is correct about sorting algorithms?:

a)

[x] Some algorithms are slower than usual

b)

Some algorithms are more efficient than usual

9.

Q.9 What is the complexity of an algorithm containing one loop in one loop?:

a)

[x] O(N2)

b)

ok

10.

Q.10 Which sorting algorithm uses a “divide and conquer” technique?:

a)

[x] merge sort

b)

ok

11.

Q.11 Which class contains the sudoku problem?:

a)

np

b)

ok

12.

Q.12 How many ways can we sort data?:

a)

a lot

b)

okay

13.

Q.13 When inputs are reversed, which statement is correct about sorting algorithms?:

a)

Some algorithms are slower than usual

b)

ok

14.

Q.14 Which statement is correct?:

a)

All sorting algorithm generally give the same output

b)

All sorting algorithm have exactly the same complexity

c)

All sorting algorithm have exactly the same efficiency

d)

All sorting algorithm need the same time to terminate

15.

Q.15 When is it wise to use the Dijkstra’s algorithm?:

a)

While traveling

b)

ok

16.

Q.16 Which application uses a greedy algorithm?:

a)

Huffman’s lossless data compression

b)

ok

17.

Q.17 What is the complexity of an algorithm containing two loop in one loop?:

a)

O(N2)

b)

O'(N2)

18.

Q.18 Which basic actions are performed on the data structures?:

a)

Insertion, deletion, sorting and searching

b)

okay

19.

Q.19 Which statement is correct?:

a)

A solution of a NP-problem cannot be checked

b)

A solution of a NP-problem can be found relatively fast

c)

A solution of a NP-problem can be checked relatively fast

d)

A solution of a NP-problem cannot be found

20.

Q.20 What is the objective of a heuristic algorithm?:

a)

find quickly a solution that is good enough

b)

okay

21.

Q.21 Which statement is correct?:

a)

algorithm producing the same result are the same

b)

two different algorithms will produce two different results

c)

some algorithms are better than others even if they produce equal results

d)

the outputs of an algorithm is independent from the input

22.

Q.23 Which statement could define an algorithm ?:

a)

ok

b)

set of instruction to accomplish a task

23.

Q.22 Which statement could define the “dynamic programming” paradigm ?:

a)

Using some shortcuts to obtain the solution of the main problem

b)

recursively combining results of independent subproblems to obtain the solution of the main problem

c)

using the results of overlapping subproblems to obtain the optimum solution of the main problem

d)

replacing original input by a smaller one, find a solution, then transform it to obtain the solution of the main problem

24.

Q.24 Which statement is correct ?:

a)

the complexity of one sorting algorithm depends on the inputs

b)

the efficiency of one sorting algorithm depends on the inputs

c)

the fastest sorting algorithm is always the same, regardless of the inputs

d)

the correctness of one sorting algorithm depends on the inputs

25.

Q.25 What allows the big-O notation ?:

a)

it simplifies the analysis of algorithm efficiency

b)

okay

26.

Q.26 Which statement could define the “divide and conquer” paradigm ?:

a)

recursively combining results of independent subproblems to obtain the solution of the main problem

b)

replacing original input by a smaller one, find a solution, then transform it to obtain the solution of the main problem

c)

using some shortcuts to obtain the solution of the main problem

d)

using the results of overlapping subproblems to obtain the option solution of the main problem

27.

Q.27 Which data structure follows the rule “First-In-First-Out” ?:

a)

a queue

b)

ok

28.

Q.28 What generally allows merge sort compared to selection sort ?:

a)

it sorts faster

b)

okay

29.

Q.29 What tool allows to “observe” the possibilities of events ?:

a)

a tree

b)

loop

30.

Q.30 Where is it that heuristic can’t be found ?:

a)

in brute-force algorithms

b)

okay

31.

Q.31 What does contain the NP-complete class ?:

a)

the hardest NP-problems

b)

okay

32.

Q.32 What choice makes a greedy algorithm at each stage ?:

a)

Fine

b)

optimal choice

33.

ok

a)

16

b)

20

c)

<16