Right.? I'm going to set up a variable to say, none what's the answer I want to return, is it there or not. Initially it's got that funny value none.
看我要找的答案在不在数组里面,初始化为,然后建立一个索引。
So I'm going to go over here, and I'm going to type test search-- I can type and if you look at your handout, it's just a sequence of tests that I'm going to do OK. So initially, I'm going to set up the list to be the first million integers.
大家可以看看你们的课堂材料,那儿有一些我要做的实验,好,一开始我先去建立个,含有一百万个integer的数组,对,这有点儿简单,但是这给我提供了这样一个有序的数组。
And built up the list corresponding to the three items that the user entered.
建立起对应的数组来,因此这里,我能得到的唯一中间值就是res了。
应用推荐