Time complexity for 3 nested loops with 2 variables
how to represent the time complexity for the next nested loops when there
are 2 variables involved and not just N?
Let's say N=input of the size And A=some discrete value (relevant quantity)
so for N=50000 and for A=30000
for( int i=0;i<N;i++)
{
for( int j=0;j<A;j++ )
{
for( int x=0;x<N;x++)
{
// do something
doSomething();
}
}
}
Could it be O(N^2*A)?
Thank you in advance chus
No comments:
Post a Comment