Hi eveyone :)
I am having trouble understanding some big o notation that i have been given in homework. I have tried reading my text books but nothing makes sense to me well. Below is one of the problems i have been given
#include <stdio.h>
int main()
{
int i, inner_count = 0, n = 40000;
for(i = 0; i < n * n; i++)
{
count++;
}
printf("Inner statement executed %d times\n", count);
return 0;
}
Is the running time of this code expressed as O(n)??? I'm pretty sure its not because of the n * n
part of the for loop
Your help would be greatly appreciated :)