正在加载图片...
问题2:以下两个程序,在执行效率上有什么 区别? ·对一个二维数组A[m,n进行遍历: ■程序1: for /from 1 to M do for Jfrom 1 to N do do something with A[l,J] ·程序2: for Jfrom 1 to N do ■for from1 to M do do something with A[l,]问题2:以下两个程序,在执行效率上有什么 区别?  对一个二维数组A[m,n]进行遍历:  程序1:  for I from 1 to M do  for J from 1 to N do  do something with A[I,J]  程序2:  for J from 1 to N do  for I from 1 to M do  do something with A[I,J]
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有