Page 1 of 1

void funco(int n) { for (int i = 0; i < n*n; i++) { for (int j = 0; j < log n; j++){ print i*j; } } The Big-O complexity

Posted: Mon Jun 06, 2022 2:19 pm
by answerhappygod
Void Funco Int N For Int I 0 I N N I For Int J 0 J Log N J Print I J The Big O Complexity 1
Void Funco Int N For Int I 0 I N N I For Int J 0 J Log N J Print I J The Big O Complexity 1 (15.06 KiB) Viewed 15 times
void funco(int n) { for (int i = 0; i < n*n; i++) { for (int j = 0; j < log n; j++){ print i*j; } } The Big-O complexity of the above function is: O(n log n) O(n*n log n) 0(1) O(n + log n) }