Time complexity for 3 nested loops with 2 variables -


how represent time complexity next nested loops when there 2 variables involved , not n?

let's n=input of size , a=some discrete value (relevant quantity)

so n=50000 , a=30000

for( int i=0;i<n;i++) {     for( int j=0;j<a;j++ )     {        for( int x=0;x<n;x++)        {           //           dosomething();        }     } } 

could o(n^2*a)?

thank in advance chus

yes, complexity in case o(n^2*a)


Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -