Estimate the instruction counts for each


Estimate the instruction counts for each of the following - what category do they belong
i) j = 0;
while (j < n) {
if (a[j] == target) 
findIndex = j;
j++;
}

i) k = 1;
for (int j = 1; j < 5; j++) {
a[j] = j + 1;
k++;
}
System.out.println("" + k);

iii) for (int j = 0; j < n-1; j++) {
for (int k = 0; k < n-1; k++)
if (a[k] > a[k+1]) {
temp = a[k];
a[k] = a[k+1];
a[k+1] = temp;
}

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Estimate the instruction counts for each
Reference No:- TGS0134892

Expected delivery within 24 Hours