Determining the big-O runtimes of these different loops?
问题 I have a series of questions in which I need feedback and answers. I will comment as to what I think, this is not a homework assignment but rather preparation for my exam. My main problem is determining the iterations of a loop for different cases. How would go about attempting to figure that out? Evaluate Running time. Q2. for(int i =0 ; i < =n ; i++) // runs n times for(int j =1; j<= i * i; j++) // same reasoning as 1. n^2 if (j % i == 0) for(int k = 0; k<j; k++) // runs n^2 times? <- same