The findAvgID() method:
float findAvgID(in []a, int n) {
float sum = 0;
int count = 0;
while(count < n) {
sum += grades[count];
count++;
}
if(n>0)
return sum/n;
else
return 0.0f;
}
The cost of this code is 3n + 5, which I understand, I just don't get what theta notation is.

New Topic/Question
Reply


MultiQuote



|