你能解释一下我如何能得到这个算法的最坏情况Big O. 我正在阅读我的教科书,我遇到了类似这样的算法,但仍然不理解它背后的逻辑.
int t=0;
for(int x=0;x<num.length;x++){
for(int y=0;y<num.length;y++){
for(int p=0;p<num.length;p++){
for(int w=0;w<num.length;w++){
if(num[p][w]>num[x][y])
{
t=num[x][y];
num[x][y]=num[p][w];
num[p][w]=t;
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)