- 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
-
- 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
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)