Do one comparison and return one of two possible orders on it, but I need to decide that.
虽然可以做一次比较,然后返回两个可能的顺序中的一个为结果,但是这需要我来做决定。
because your mind is already in that mode of bringing ideas from concept to something a little bit more concrete.
因为你的大脑已经处在能把概念转化为比较具体的实物的模式中了。
Selection sort too really reduces to a total number of comparisons because I'm again comparing the current smallest to the next thing I see, the next thing, so really a lot of these sorting algorithms boil down to comparisons and the numbers that you actually have to make.
选择排序也可归纳为总数的比较,因为要将当前最小者与下一个进行比较,接着再下一个,可见,很多排序算法都可归结为比较,以及需要比较的次数。
We've got lots of things going on here this morning so just play a scale quickly and then vibrato, pizzicato and tremolo for us.
我们今早的内容比较多,所以请快速为我们演奏一下音阶,揉弦,拨奏和碎弓
If you knew this was one kilogram, then the acceleration of the elephant, which will be some tiny number, maybe 100th of what this guy did; the mass of the elephant is then 100 kilograms.
如果已知这个物体的质量为 1 千克,那大象的加速度,会是一个比较小的数,可能是物体加速度的 1 / 100,大象的质量就是 100 千克
You just say that arbitrarily this group, the reference group, let's say the group with the lowest weights, or the lowest cholesterol or anything, you say their risk is one, and then you look to see how everybody else's risk is compared to that.
可以随意地设定一个群组,作为参照组,我们可以假设是体重最低的一组,或者胆固醇水平最低的一组或者其他,将参照组的风险设为1,然后就可以比较参照组与其他组的风险
A different function to compare polar versions of these points.
我可以假设去为比较相同的店,再去写一个方法。
Taking the problem, recognizing that you know what, 8 even though this is a pretty big problem size 8 in this case and last time it was size 8 or in the case of the papers in size of a thousand roughly with the phonebook, I assume these are in a perfectly straight line they won't quite fit.
以这个问题为例,你们要认识到,在这种情况下,这是个比较大的问题,其大小是,上次它的大小也是8,但在纸片那个问题中,电话簿的规模大概是上千的,现在假设这些,杯子完全在同一条直线上,虽然并不十分符合这个条件。
Remember last time, we wrote this simple piece of code to print out even or odd. If, you know, x, it was in fact, even or odd. So let me show you what a flow chart for that would look like, because I want to make a comparison point here.
记得上节课我们写过的,那个显示奇数还是偶数的程序么,如果,你知道,x,实际上是奇数还是偶数,那么让我来为大家画个这个程序的流程图吧,因为我这里想为大家做个比较。
应用推荐