- 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 13 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
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
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
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) }