Page 1 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

Posted: Tue Jul 12, 2022 8:19 am
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 30 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)