Question
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)
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:
| |||
| |||
| |||
|
Save
Question 2 (1 point)
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:
| |||
| |||
| |||
|
Save
Question 3 (1 point)
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)
What is the worst case time complexity of the QuickSort algorithm?
Question 4 options:
| |||
| |||
| |||
|
Save
Question 5 (1 point)
What is the time complexity of the following loop? for (var i=0; i
Question 5 options:
| |||
| |||
| |||
|
Save
Question 6 (1 point)
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)
What is the time complexity of the following loop? for (var i=0; i
Question 7 options:
| |||
| |||
| |||
|
Save
Question 8 (1 point)
2^(n+1) isO(2^n)
Question 8 options:
1) True | |
2) False |
Save
Question 9 (1 point)
Comapring 2 different JavaScript objects using === will always return ______
Question 9 options:
Save
Question 10 (1 point)
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started