4. (20 pts) Considering the pseudocode below, answer the following three questions: for (i = 0; i
Posted: Sat Feb 19, 2022 3:20 pm
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.
4. (20 pts) Considering the pseudocode below, answer the following three
Posted: Sat Feb 19, 2022 3:20 pm
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.
4. (20 pts) Considering the pseudocode below, answer the following three