6. What is the output of this program? import java.uti1 class Output public atat
ID: 3593628 • Letter: 6
Question
6. What is the output of this program? import java.uti1 class Output public atatie void main (String arge (1) ArrayList obj-new ArrayList O obj.add("A) obj add (O, "B) System.out.printin (obj.aize)) b. 3 d. 4 7. Big-Theta notation is: a. A lower bound on the runtime complexity of an algorithm. b. A tight bound on the runtime complexity of an algorithm. c. An upper bound on the runtime complexity of an algorithm. d. A side bound on the runtime complexity of an algorithm. e. Has nothing to do with the algorithm's runtime complexity. S. What is the tightest bound possible for (N) N°(4 log N -log N)+ (N3) (N2) b. a. (N° log N) c, (N3) d, (log N) e, (N4) 9. Big-Omega notation is: a. A lower bound on the runtime complexity of an algorithm. b. An upper bound on the runtime complexity of an algorithm. c. A tight bound on the runtime complexity of an algorithm. d. A side bound on the runtime complexity of an algorithm. e. Has nothing to do with the algorithm's runtime complexity 10. What is the tightest bound possible for f(N) N(N + 1)2? (N2) (N3) a. b, d. e, (N4) (N5)Explanation / Answer
6. ans:- option (A) i.e 2
line:- obj.add("A"); //add A to the list at index 0
line:- obj.add(0,"B"); //add B to the list at index 0 and shift A to index 1
7. ans:- option (c)
Big Theta notation is a:- Tight bound on the run time complexity of an algorithm
because "Asymptotically" it matters for only large values of n.
8. ans:- option (e) i.e N^4
Tight bound stands for Big Theta notation. "Asymptotic Tight bound on the run time complexity of an algorithm matters
for only large values of n. and here N^4 is the largest value.
9. ans:- option (A)
Big Omega notation is a:- Lower bound on the run time complexity of an algorithm
big- notation is used for asymptotic lower bounds, since it bounds the growth of the running time.
10. ans:- option (b) i.e. N^3
Tight bound stands for Big Theta notation. "Asymptotic Tight bound on the run time complexity of an algorithm matters
for only large values of n. and here N^3 is the largest value.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.