CS 2114 Reading Quiz 4

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

If an algorithm requires 7 basic operations for an algorithm with a problem size of n, the algorithmic complexity is: a) O(1) b) O(7) c) O(n) d) O(7n)

a) O(1)

What is the time complexity for adding an entry to a fixed-size array-based bag ADT? a) O(1) b) O(n) c) O(n^2) d) negligible

a) O(1)

What is the time complexity for adding an entry to a linked-based bag ADT? a) O(1) b) O(n) c) O(n^2) d) negligible

a) O(1)

For large values of n which statement is true? a) (n^2 + n ) / 2 behaves like n b) (n^2 + n ) / 2 behaves like n^2 c) (n^2 + n ) / 2 behaves like n/2 d) all of the above

b) (n^2 + n ) / 2 behaves like n^2

What is the worst-case time complexity for searching a linked-based bag ADT for a particular entry? a) O(1) b) O(n) c) O(n^2) d) negligible

b) O(n)

An algorithm has: a) time requirements b) space requirements c) a & b d) none of the above

c) a & b

You should express the complexity of an algorithm in terms of it: a) space requirements b) execution time c) problem size d) overall complexity

c) problem size

Problem size is defined as: a) the amount of memory an algorithms uses b) the amount of execution time an algorithm takes c) the number of items an algorithms processes d) none of the above

c) the number of items an algorithms processes


Kaugnay na mga set ng pag-aaral

Report on Sles Trip - South Korea

View Set

World Geography Unit 2 Exam study guide

View Set

(Learning Curve 11 a) Body Development; Cognitive Development Psy 200 chapter 11

View Set

ATR2010-Ch2- Concepts of Sports Injury

View Set

Otázky českého občanství - Realie

View Set

22.09.21 Psychologie clinique de l'enfant et de l'adolescent

View Set

Cranial Nerves Trigeminal only: Head and Neck Innervation

View Set