What is the best growth function to represent the following code fragment? The fragment is parameterized on the variable
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What is the best growth function to represent the following code fragment? The fragment is parameterized on the variable
What is the best growth function to represent the following code fragment? The fragment is parameterized on the variable n. Assume that you are measuring the number of printin calls. for (int i; i<n; 3) for (int 301 3<n/21 **) System.out.println("More nested loops!"); //count these O-nlog2(n)? O O(nlog3(n)) f(n)=(1/2)nlog3(n) O -(1/2)nlog3(n) O f(n)=nlog3(n)-n/2
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!