This nightfall as I sat in the yard to enjoy the cool, it struck me how assorted the lotus pool I pass each daytime must look below a full moon.
今晚在院子?坐著乘凉,忽然想起日日走过的荷塘,在这满月的光?,总该另有一番样子吧。
Each time I pass on a bicycle I am made grumpy by the bossy inscriptions carved on its front.
每次我骑着自行车从此经过,看到刻在纪念碑前面的浮雕文字,我就想生气。
I wrote just enough code at each step to get the tests to pass.
我只在每步编写足够让测试通过的代码。
Why don't I just keep track on each pass through the algorithm whether I have done any swaps?
我为什么不仅仅跟踪算法的,每一遍来看看我做了哪些交换呢?
And in this case, we go from 8 to 4 to 2 to 1 three times and then on each iteration of this algorithm, each pass across the board I'm touching N numbers, so that means I'm doing N things, log N times.
在这个例子中,我们从8得到4,到2,再到1,是3次,在这个算法的每次迭代中,每一趟我都会操作N个数,也就是所我每次要做N步操作,一共要做,log,N,次。
应用推荐