(如果C=1,每个for loop要运行n次O(1) expressions) 3.O(nc): 嵌套循环的时间复杂度等于最里面的程序的运行次数。 for(inti =1; i <=n; i +=c) {for(intj =1; j <=n; j +=c) {//some O(1) expressions} }for(inti = n; i >0; i +=c) {for(intj = i+1; j <=n; j +=c...
About a year ago, I discovered a passion for VM and language design and red lots of code, research papers and coded my own Ruby VM and language. To Self or Not to Self — Jan 14, 2009 A piece of Ruby code I often see in ActiveRecord code is this: Io Gives You Super Disco Nucl...