estion 7 (6 points) Describe the order of growth of each of the following code sections, using O notation: a. b. C. d. f
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
estion 7 (6 points) Describe the order of growth of each of the following code sections, using O notation: a. b. C. d. f
estion 7 (6 points) Describe the order of growth of each of the following code sections, using O notation: a. b. C. d. f. e. count = 0; for (i = 1; i <= N; i++) count++; count = 0; for (i = 1; i <= N; i++) for (j1; j <= N; j++) count++; value=N; count = 0; while (value > 1) ( value= value / 2); count++; } count = 0; value=N; value = N * (N - 1); count = count + value; count = 0; for (i = 1; i <= N; i++) count++; for (i = N; i >= 0; i--) count++; count = 0; for (i = 1; i <=N; i++) for (j = 1; j <= 5; j++) count++; Question 8 (Show all work) (8 points) Show the sequence of changes the array values undergoes while it is sorted using selection sort. values 27 15 83 12 104 28 57 30