What is the time complexity of the following code (Suppose m>0 and >1)? int func (int m, int n) { int i=0; while (m<100)

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
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

What is the time complexity of the following code (Suppose m>0 and >1)? int func (int m, int n) { int i=0; while (m<100)

Post by correctanswer »

What Is The Time Complexity Of The Following Code Suppose M 0 And 1 Int Func Int M Int N Int I 0 While M 100 1
What Is The Time Complexity Of The Following Code Suppose M 0 And 1 Int Func Int M Int N Int I 0 While M 100 1 (16.36 KiB) Viewed 60 times
What is the time complexity of the following code (Suppose m>0 and >1)? int func (int m, int n) { int i=0; while (m<100) { i++; } for (int i=0; i<n-1; i++) { for (int j =n; j>i; j--) return i*j; } } A. 0(m) B. o(²) C. o(m+n²) D. 0(1) m++;
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply