58. What is the time complexity of this pseudocode? for (int i=1;j<=n;j++) \{ int j=n​​ while (j>=1) \{ cout <

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

58. What is the time complexity of this pseudocode? for (int i=1;j<=n;j++) \{ int j=n​​ while (j>=1) \{ cout <

Post by answerhappygod »

58 What Is The Time Complexity Of This Pseudocode For Int I 1 J N J Int J N While J 1 Cout J 2 I J 1
58 What Is The Time Complexity Of This Pseudocode For Int I 1 J N J Int J N While J 1 Cout J 2 I J 1 (21.17 KiB) Viewed 31 times
58. What is the time complexity of this pseudocode? for (int i=1;j<=n;j++) \{ int j=n​​ while (j>=1) \{ cout <<j%2 i j/=2​ i 3 cout << endli \} a. Q(n∗n) b. O(log(n)) c. O(n∗ m) d. Q(n∗log(n)) 59. ???????????????| 60. What is the time complexity of this pseudocode? Algorithm Algo2(A) Input: An nxn matrix of integers with n>=1 Output: The sum of the integers in the matrix s=0 for j=1 to n do for j=1 to no s=Σ+A[j][j] return s a. Q(nlogn) b. O(n∧2) c. Q(logn) d. O(1) 61. Which sorting algorithm works by repeatedly swapping adjacent elements if they are out of order? a. Bubble b. Radix c. Shell d. Bucket
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply