If I haven't solved the problem, let me solve it, and store the answer away for later reference.
让我解决它,然后保留答案以备下次调用。
Actually it's not 40, I think these are, 75 alright. So the answer is 75 and the number of calls is 1.7 million.
实际上不是4,我觉得,好了,所以答案是5,调用次数是1百70万次。
So, you turned in p-set 3 today, but we'll have the answers posted for you this afternoon, so you can start studying from p-set 3, even as early as tonight, if you want to, because those answers will be there for you.
今天大家应该要交第三次作业了,而我们会在今天下午将答案给大家贴出来,这样大家就可以尽快开始复习第三次作业的内容了,甚至今天晚上就可以开始,如果你需要的话,这些答案将会给你一些帮助。
It got 85. Same answer, but 50 calls instead of 85.
答案还是85但是只调用了,50次而非85次。
5 recursive calls to get there.
5次递归调用,才得到这个答案。
Sorry? OK. You're doing the whole thing for me What's the complexity just of this inner loop m How many times do I go through that loop?
就这一块代码的,我执行了多少次这个循环?,次对不对?,here?,Just,this,piece。,我一会儿就会去得到你的答案的?
b times. So I've got to go 3 b steps. All right I've got to go through the loop b times I've got three steps each time, and then when I pop out of the loop, I've got two more steps. All right I've got the initiation of answer and the return of it.
好,我一共执行了b次循环,每次循环内部进行了三次基本操作,当跳出循环后还有两个基本操作,因此这个初始的答案就是,2+3b次基本操作,来完成这个循环。
应用推荐