wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ALGO - Lesson 4 (Data Structure)

Total questions: 28

Worksheet time: 15mins

Name
Class
Date
1.

Organization of data to be used efficiently.

a)

Data Structure

b)

Data Storage

c)

Data Organization

2.

Amount of time an algorithm takes to run

(as the size of the problem/input increases).

a)

Time Complexity

b)

Space Complexity

3.

Amount of memory an algorithm uses

(as the size of the problem/input increases).

a)

Time Complexity

b)

Space Complexity

4.

Focuses on the speed of an algorithm.

a)

Time Complexity

b)

Space Complexity

5.

Focuses on the memory usage of an algorithm.

a)

Time Complexity

b)

Space Complexity

6.

How big the instruction is.

a)

Time Complexity

b)

Space Complexity

7.

BUT, in an ideal algo, ____________ is the only variable to be focused on.

a)

Time Complexity

b)

Space Complexity

8.

WHY? In an ideal algo, time complexity is the only variable to be focused on.

- Because in an ideal world, we want our algorithms to be ___________, so focusing on time complexity makes sense.

a)

as fast as possible

b)

as slow as possible

c)

as efficient as possible

d)

as helpful as possible

9.

WHY? In an ideal algo, time complexity is the only variable to be focused on.

- An algorithm that runs faster is often seen as more "_______", even if it uses more memory.

a)

efficient

b)

slower

c)

helpful

10.

WHY? In an ideal algo, time complexity is the only variable to be focused on.

- An algorithm with a __________ is often preferred, even if it has a __________________.

a)

lower time complexity, higher space complexity

b)

higher time complexity, lower space complexity

c)

lower space complexity, higher time complexity

d)

higher space complexity, lower time complexity

11.

it is the only variable that directly affects the performance (and efficiency) of the algorithm.

a)

Time Complexity

b)

Space Complexity

12.

WHY? In an ideal algo, time complexity is the only variable to be focused on.

- Algorithms with _________ time complexity tend to ______ better as input sizes increase.

a)

lower

b)

higher

c)

scale

d)

shrink

13.

WHY? In an ideal algo, time complexity is the only variable to be focused on.

- Algorithms with _________ time complexity tend to ______ better as input sizes increase.

a)

lower

b)

higher

c)

scale

d)

shrink

14.

Problem: You want to insert an element in the first position in array.

Solution: __________________

Conclusion: ___________ is faster to array in this scenario. All other solutions can be revisited upon recalculating the time complexity of this problem.

a)

Linked List

b)

Dictionary

c)

Trees

d)

Graphs

15.

Running time depends on how small your input is.

a)

True

b)

False

16.

Example 1:

f(n) = 5n^2 + 6n + 12

n = 1

Get the percentage (%) of the running time for the first term:

a)

21.74%

b)

26.09%

c)

52.17%

17.

Example 1:

f(n) = 5n^2 + 6n + 12

n = 1

Get the percentage (%) of the running time for the second term:

a)

21.74%

b)

26.09%

c)

52.17%

18.

Example 1:

f(n) = 5n^2 + 6n + 12

n = 1

Get the percentage (%) of the running time for the third term:

a)

21.74%

b)

26.09%

c)

52.17%

19.

Example 1:

f(n) = 5n^2 + 6n + 12

n = 1

To check: 21.74% + 26.09% + 52.17% = 100%

a)

True

b)

False

20.

Example 2:

f(n) = 5n^2 + 6n + 12

n = 10

Get the percentage (%) of the running time for the first term:

a)

87.41%

b)

10.49%

c)

2.10%

21.

Example 2:

f(n) = 5n^2 + 6n + 12

n = 10

Get the percentage (%) of the running time for the second term:

a)

87.41%

b)

10.49%

c)

2.10%

22.

Example 2:

f(n) = 5n^2 + 6n + 12

n = 10

Get the percentage (%) of the running time for the third term:

a)

87.41%

b)

10.49%

c)

2.10%

23.

Example 2:

f(n) = 5n^2 + 6n + 12

n = 10

Numerator: 500 + 60 + 12 = 572

a)

True

b)

False

24.

Example 2:

f(n) = 5n^2 + 6n + 12

n = 10

To check: 87.41% + 10.49% + 2.10% = 100%

a)

True

b)

False

25.

Is this is the proper way of showing growth rate?

a)

True

b)

False

26.

How do you draw a conclusion for this quadratic equation:

5n^2+6+12

Conclusion: _____________________________________________________, I can say/conclude that the runtime for 5n^2 and 6n is heavier as the value of n increases and the runtime of 12 decreases as the value of n increases.

a)

Based on my computations of the quadratic equation of 5n^2+6+12 with the f(n) with n=1 and n=10

b)

Based on my notes of the quadratic equation of 5n^2+6+12 with the f(n) with n=1 and n=11

c)

Based on my answers of the quadratic equation of 5n^2+6+12 with the f(n) with n=2 and n=10

d)

Based on my analysis of the quadratic equation of 5n^2+6+12 with the f(n) with n=1 and n=100

27.

How do you draw a conclusion for this quadratic equation:

5n^2+6+12

Conclusion: Based on my computations of the quadratic equation of 5n^2+6+12 with the f(n) with n=1 and n=10, _________________________________________ and the runtime of 12 decreases as the value of n increases.

a)

I can say/conclude that the runtime for 5n^2 and 6n is heavier as the value of n increases

b)

I can say/conclude that the runtime for 5n^2 and 6n is not heavier as the value of n increases

c)

I can say/conclude that the runtime for 5n^2 and 6n is heavier as the value of n decreases

28.

How do you draw a conclusion for this quadratic equation:

5n^2+6+12

Conclusion: Based on my computations of the quadratic equation of 5n^2+6+12 with the f(n) with n=1 and n=10, I can say/conclude that the runtime for 5n^2 and 6n is heavier as the value of n increases and _______________________________________.

a)

the runtime of the constant value of 12 decreases as the value of n increases.

b)

the runtime of the constant value of 12 increases as the value of n increases.

c)

the runtime of the constant value of 12 decreases as the value of n decreases.