R
rajesh kalra
what is the complexity of the following:
for(i=0 to n*n)
{
cout<<"hello\n";
}
and
for(i = 0 to n)
{
for(j = 0 to i*i )
{
for( k = 0 to j )
{
cout<<"hello\n";
}
}
}
for(i=0 to n*n)
{
cout<<"hello\n";
}
and
for(i = 0 to n)
{
for(j = 0 to i*i )
{
for( k = 0 to j )
{
cout<<"hello\n";
}
}
}