正在加载图片...
Consecutive statements for(=0;i<n;+) These just add a[i=0; O(N)+O(N2)=O(N2) for (i=0:; k<n:; ++ for (=0; j<n j ++ a+=a]++ Conditional: If s1 else s2 never more than the running time of the test plus the larger of the running times of S1 and S2 O(1)8 Consecutive statements These just add O(N) + O(N2 ) = O(N2 ) Conditional: If S1 else S2 never more than the running time of the test plus the larger of the running times of S1 and S2. O(1)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有