So let me just to try something a little more interesting, and then we'll get to writing some simple programs.
让我们来试试更加有趣的,一些事情吧,然后,我们再去写一些简单的小程序。
So do you mind trying upstairs first and then downstairs?
你不会介意我们先试试楼上再尝试楼下吧?
Well, let's try it. Let's try a little test. OK?
不过我们还是来试试吧,做个小测试怎么样?
People are like "sign me up, I want some of that."
人们都喊着“让我加入吧,我想试试“
Let's see if we could sing it together because we're going to do this in a different way in a second.
那我们试试把它唱出来吧,一会我们就要换一种方法了。
Let's try that. All right.
我们来试试,好吧。
So try it.
试试吧。
In this case, it's cutting up from the bottom end, which makes sense because the thing I'm looking for is always bigger than the midpoint and then, I don't know, let's pick something in between. Somebody want-- ah, I keep doing that-- somebody like to give me a number?
排除元素,这是讲得通的,因为我总是找比中点大的元素,那让我们挑一个同,中点之间的元素吧,我再来试试,谁给我个数字吧,我知道你们想给我些其他东西?
They are computationally challenged, meaning, at the time they were invented, they were perfectly good sorting algorithms, there are better ones, we're going to see a much better one next time around, but this is a good way to just start thinking about how to do the algorithm, or how to do the sort.
他们是相当棒的排序算法,是有更好的算法,我们下一次,就会看一个更好的,但是开始想想,如何完成算法,或者说是如何排序,是一个好的学习方法,恩,再试试吧,如何来排序呢?
So just to show you how big a difference it makes, let's run a couple of numbers.
让我们试试一组数字吧,如果n是1000的话。
应用推荐