Second step, hm. That also looks constant, you think? Oh but wait a minute. I'm accessing s.
第二步,恩,看起来也像常量,你认为呢?等等,我在进入这个数组。
Reading for him is a way of accessing feeling and that's the kind of reading that he wants from us, from the people who read his book.
对他来说,读书是获得感觉的方式,同时,他也是在向我们,灌输一种他的读书观念。
I'm accessing a list. How long does it take for me to get the nth element of a list?
我取得数组的第N个元素,需要多长时间呢?
Those of you who know other languages might have in your heads 200,000 words or 300,000 words and you're accessing them in a fraction of a second.
你们当中掌握其他语言的人,可能会在头脑中记住两万到三万个词,你们能在瞬间运用它们
I think it does factor into her sense that the truth she is accessing, or the truth that she is trying to present to the world in her stories, is one that even a child might be able to understand.
我想这确实是一个因素能让她觉得,她所触及的事实,或者说她通过故事向世人呈现的事实,连一个孩子也可能理解。
That's accessing an element of a list.
我们需要确认这一点。
With this, if I can assume that accessing the i'th element of a list is constant, then you can't see that the rest of that analysis looks just like the log analysis I did before, and each step, no matter which branch I'm taking, I'm cutting the problem down in half.
读取数组中的第i个元素,是个常量时间的操作的话,我也就能像以前那样得到,这个算法是对数级复杂度的分析,并且每一步不管我选择哪个区间,我都可以把问题的规模缩小一半。
应用推荐