4. (20 pts) Considering the pseudocode below, answer the following three questions: for (i = 0; i

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

4. (20 pts) Considering the pseudocode below, answer the following three questions: for (i = 0; i

Post by answerhappygod »

4 20 Pts Considering The Pseudocode Below Answer The Following Three Questions For I 0 I N I Printf Hell 1
4 20 Pts Considering The Pseudocode Below Answer The Following Three Questions For I 0 I N I Printf Hell 1 (23.88 KiB) Viewed 47 times
4. (20 pts) Considering the pseudocode below, answer the following three questions: for (i = 0; i<n; i++) { printf("Hello class”);} for (i = 1; j < n?; j++){ for (k = 0; k<n lg n; k++) { printf("Hello class");}} a) (5 pts) When n = 2, how many times will "Hello class" be printed? b) (5 pts) When n = 4, how many times will "Hello class" be printed? c) (10 pts) Drive the complexity function T(n) of this algorithm.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply