1. Engineering
  2. Computer Science
  3. i did the home work and my teacher said that...

Question: i did the home work and my teacher said that...

Question details

In this problem you will count the exact number of steps for the code segment below. You should count each assignment and each comparison as one step // the outer loop while (i n) // the inner loop for 0:ji) sum++ product *- i*j i- i +1 Q1.(2 points) When i is 0, the number of steps in the entire inner loop is Q2.(1 points) When i is 1, the number of steps in the entire inner loop is Q3. (3 points) When i is k, for some k> 1, the number of steps in the entire inner loop is Q4. (4 points) The total number of steps in the code segment isLager locp 3 m e t -0 to Breuk ev+

I did the home work and my teacher said that Q1 is 7 steps and Q2 us 11 steps. This is how I got their I was wondering if any one can tell me, if im doing this wrong or right. Epically number Q3 because I'm unsure of what to do new K>1.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution