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
-
answerhappygod
- Site Admin
- Posts: 899604
- 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) }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!