Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 (1 point) What is the time complexity of the function function fun(n) { var count = 0; for (var i = n; i

Question 1 (1 point)

image text in transcribed

What is the time complexity of the function function fun(n) { var count = 0; for (var i = n; i > 0; i /= 2) { for (var j=0; j

Question 1 options:

1)

O(n^2)

2)

O(n log n)

3)

O(n)

4)

O(n logn logn)

Save

Question 2 (1 point)

image text in transcribed

what is the time complexity of the following function? function fun(n, a) { var i = 0, j = 0; for (i = 0; i

Question 2 options:

1)

O(n)

2)

O(n^2)

3)

O(n logn)

4)

O(n^2 logn)

Save

Question 3 (1 point)

image text in transcribed

Put these in the correct order of asymptotic complexity

Question 3 options:

1234

n ^ (3/2)

1234

n log n

1234

n^logn

1234

2^n

Save

Question 4 (1 point)

image text in transcribed

What is the worst case time complexity of the QuickSort algorithm?

Question 4 options:

1)

O(n^2)

2)

O(n)

3)

O(n log n)

4)

O(n^2 log n)

Save

Question 5 (1 point)

image text in transcribed

What is the time complexity of the following loop? for (var i=0; i

Question 5 options:

1)

O(n)

2)

O(n^2)

3)

O(logn)

4)

O(n logn)

Save

Question 6 (1 point)

image text in transcribed

The minimum number of comparisons to find the minimum AND the maximum of 63 numbers is

Your Answer:Question 6 options:

Answer

Save

Question 7 (1 point)

image text in transcribed

What is the time complexity of the following loop? for (var i=0; i

Question 7 options:

1)

O(n)

2)

O(n^2)

3)

O(logn)

4)

O(n logn)

Save

Question 8 (1 point)

image text in transcribed

2^(n+1) isO(2^n)

Question 8 options:

1) True
2) False

Save

Question 9 (1 point)

image text in transcribed

Comapring 2 different JavaScript objects using === will always return ______

Question 9 options:

Save

Question 10 (1 point)

image text in transcribed

if you calculate a number outside the largest possible number, JavaScript will return _______. (Or negative ______)

Question 10 options:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

Students also viewed these Databases questions

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago