Big O Notation

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What is the big O of a binary search of an array of size 1024?

10

What is the big O of a sequential search of an array of size 1,024?

1024

What size of an array in a sequential search has the same big O notation for a binary search of array with a size of 7?

128

Suppose that a process requires 400 + 32n + n^2steps for a problem of size n. What is the degree of the polynomial?

2

For the function f(n) = n^3 - 2n^2 + 3n + 2,000, what is the dominant term if the size of the problem is n is 3 or 4?

2,000 - or - The constant term

Suppose that a process requires 512+47k + 3k^3 steps to complete given an input of size k. What is the degree of the polynomial?

3

What is the big O of a quadratic function that has a size of 20?

400

What is the big O for f(n) = 2n^3 - 5n^2 + 400 if the size of the problem is n is equal to 40?

64,000

Which one of the following describes the big O notation?

Approximate number of computations an algorithm does

Which of the following describes an algorithm that will always execute in the same amount of time regardless of the size of the input data set?

Big O1)

What is the big O notation for a linear search?

O(n)

Suppose that a process requires 400 + 32n + n^2steps for a problem of size n. What is the Big O of this process?

O(n^2)

What is the big O for a quadratic function?

O(n^2)

Suppose that a process requires 512+47k + 3k^3 steps to complete given an input of size k. What is the Big O of this process?

O(n^3)

Which one of the following do you accept for the value of big O notation?

The dominant part of a function that increases substantially as the size of the problem increases - or - The term with the highest exponent and or power

Which one of the following describes the big O of a binary search?

log_2n


Ensembles d'études connexes

ABEKA Physical Science 6.2 Inside the atom

View Set