public void PrintHalfN(int n) //print half n at a time ( int i = n; while (i >= 1) { print i; i = 1/2: The worst case of

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

public void PrintHalfN(int n) //print half n at a time ( int i = n; while (i >= 1) { print i; i = 1/2: The worst case of

Post by answerhappygod »

Public Void Printhalfn Int N Print Half N At A Time Int I N While I 1 Print I I 1 2 The Worst Case Of 1
Public Void Printhalfn Int N Print Half N At A Time Int I N While I 1 Print I I 1 2 The Worst Case Of 1 (16.98 KiB) Viewed 29 times
public void PrintHalfN(int n) //print half n at a time ( int i = n; while (i >= 1) { print i; i = 1/2: The worst case of time complexity for the code above in Big-O notation is: 0(1) Oin) Oinlogn) Ollogn)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply