Page 1 of 1

Derive expression for the worst case time complexity for the following codes. (a) (b) (c) i=1; s=1; for(i=1;i<=n;i++) fo

Posted: Thu May 26, 2022 9:43 am
by answerhappygod
Derive Expression For The Worst Case Time Complexity For The Following Codes A B C I 1 S 1 For I 1 I N I Fo 1
Derive Expression For The Worst Case Time Complexity For The Following Codes A B C I 1 S 1 For I 1 I N I Fo 1 (21.3 KiB) Viewed 27 times
Derive expression for the worst case time complexity for the following codes. (a) (b) (c) i=1; s=1; for(i=1;i<=n;i++) for(i=n/2;i<=n;i++) for(j=1;j<=i²;j++) for(j=1;j<=n/2;j++) while(s<=n) for(k=1;k<=n/2;i++) { i++; S=S+i; } for(k=1; k<=n;k*2)