• Home
  • University of the People
  • Data Structures (proctored course) CS 3303
  • Asymptotic Analysis and Algorithm Complexity

Asymptotic Analysis and Algorithm Complexity

01/04/2024, 14:18 Self-Quiz Unit 2: Attempt review | Home Starttebbon Wednesday,, 1141 Februaryy20224,66488PINM Stattre Finished Completeeldbon Wednesday,, 1141 Februaryy20044,66533PINM Time takken 4 mins 56 secs Grade 9.00 out off 1100000 ((90%) Questtoon 1 Correct Mark 1.00 outtoff11000 The upper komunaldóo the growthtof the ledgelitbrits roamingrting tisnepsesenteskebyted by: Select one: a. Big Oh (O) v b. Big Omega (2) c. Big Theta (O) d. Exponemttaà |ggovvt/th The correct answerriss : Big@Th(@) Correct Mark 1.00 outtoff11000 AsymptoticAAggithhTAAalgsjsiisiprprianitriconcerned withvith: Select one: a. The size of the constant in the algorithth muinningitigerequatjoation b. The speed of ttreecompptitig gunningrtgeralgalgtbrithm c. The speed of thecompileer d. The growthrateedeeronstsatedeid the latgølgthrit hun ningrtinge tequatiquation The correct answerriss : Thegrowththatet deleonstrattedtedthetale algorithumning tiing tiquattoquation https://my.uopeople.edu/mod/quiz/review.php?attempt=13304150&cmid=402704 1/7 01/04/2024, 14:18 Self-Quiz Unit 2: Attempt review | Home Questtoon 3 Correct Mark 1.00 outtoff11000 True/False: Big Theta (O) indicates thattttiæeUppee aad dl owerebo damals cbf af atgalgtbritlane anne saensame. Select one: True False The correct answerriss'True'. Question 4 Correct Mark 1.00 outtoff11 000 For the followingcodefragen belebe thehoptipi that he presents the the appropriate pasytre ptoyim analysisanalysis: System.outt printiti(?[])}); } Option 1. O(n) Option 2. O( 2") Option 3. O( n løg m) Option 4. O( n2) Select one: a. Optiom.11 · b. Opticum22 c. Optiom3 d. Optitorn44 The correct answerriss : Optipor1 1 https://my.uopeople.edu/mod/quiz/review.php?attempt=13304150&cmid=402704 2/7 01/04/2024, 14:18 Self-Quiz Unit 2: Attempt review | Home Questoon 5 Correct Mark 1.00 outtoff11000 For the foldwingcode fragmenty beste be ch theptiphi that he presente sets the appropriate pas re trying analysis alysis: for (inttii == 11;i <= m;ii ** 23X4 count++; } } Option 1. Q( 1) Optiiam 22. n Optiom3. ( m lbggm)) Optiom44. Q(m2) Select one: a. Option 1 b. Optitorn22 c. Optiom3 v d. Optim44 Explanation: Harethecoatæe lolop is idahene log n times andlttleeinnee dop isidokunne n timess, so T(n) = n log n. (Note thattttieedefaialt |basse for løganithins sinirComputeres Sererecisi2.2.) The correct answerriss : Oppibar33 Questromn 6 Correct Mark 1.00 outtof11000 For the followinggcodedfragmentn setede theheptipti that hepresentsethe trashappropriatepasyreptofin analysisnalysis: if (a.length > 0) {{ returma??al?eggth 1]t]; } else { } Optiom11 .. O(11) Optiiam22. O(2") Optiiam3. @(mlbiggm)) Optiom 44. Q (m2) Select one: a. Optim11 V b. Opti@m22 c. Optiam3 d. Optim44 Explanation: Hane n = a.length, andl T(n) = 1. The correct answerriss : Opptibor 1 https://my.uopeople.edu/mod/quiz/review.php?attempt=13304150&cmid=402704 3/7