(a) (2 points) int a = 0; int b = 0; int m= n*n; while(a

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

(a) (2 points) int a = 0; int b = 0; int m= n*n; while(a

Post by answerhappygod »

A 2 Points Int A 0 Int B 0 Int M N N While A N A A 1 While B M 100 B B 1 O1 On Logn O Other On N Lo 1
A 2 Points Int A 0 Int B 0 Int M N N While A N A A 1 While B M 100 B B 1 O1 On Logn O Other On N Lo 1 (175.13 KiB) Viewed 61 times
(a) (2 points) int a = 0; int b = 0; int m= n*n; while(a <n) a=a+1; while(b < m/100) b=b+1; O1 On logn O Other: On? n log n O n3 2n O n4 n" (b) (2 points) for(i = 0; i<n; i++) for(j = 0; j <i; j++) arr += arr[j]; O1 On n2 Olog n O n log n O Other: On3 2" OO On4 On" (c) (2 points) for(i = 0; i < 1000; i++) { for(j = 0; j <i; j++) { arr[j] [k] = 0; } } 01 On On? O log n O n log n O Other: Ο η3 O 21 On4 O na (d) (2 points) for(i = 1; i <n; i=i*3) for(j = 0; j<n; j++) printf("Hello world\n"); O1 On Olog n On log n O Other: O n3 021 o na Onn n4 (e) (2 points) int rec( int n) { if( n<=1) return 0; return 1 + rec(n/3); /* rec call */ } O1 On Olog n Other: O na n log n оо On3 2n nh
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply