Hi ;
I just wanted to verify why we are ignoring the time complexity of the iteration itself? meaning with this
lets say I have a for loop like
for (int i=0;i<60;i++)
{
printf("hello world");
}
so why when we want to calculate the time complexity of for we are ignoring the time of the iteration itself? we are just looking on the time complexity of operation "printf("hello world")" ..what about the time of iteration itself regardless of what's inside the iteration ....isn't it taking time also? or simply we are assuming the time of iteration itself is zero for convenient ?
thanks for your help
I just wanted to verify why we are ignoring the time complexity of the iteration itself? meaning with this
lets say I have a for loop like
for (int i=0;i<60;i++)
{
printf("hello world");
}
so why when we want to calculate the time complexity of for we are ignoring the time of the iteration itself? we are just looking on the time complexity of operation "printf("hello world")" ..what about the time of iteration itself regardless of what's inside the iteration ....isn't it taking time also? or simply we are assuming the time of iteration itself is zero for convenient ?
thanks for your help