And then I would reiterate this process using that as guess i, and do it again.
然后我会用这个猜想,继续迭代计算下去。
And then I'm going to just return the bigger of the two. Little bit complicated, but it's basically just implementing this decision tree.
我会计算总价值,然后我会返回两者中的较大值,有点小复杂,但是它就是按照这个决策树在运行。
I'm going to let t of b be the number of steps it takes to solve the problem of size b.
我会设立一个t作为,计算指数为b的时候解决问题需要的步骤数。
Computing square root. I'm going to capture it in a piece of code, I'm going to be able to refer to it by a name, and I'm going to suppress the details, meaning inside of that computation, you don't need to know what it does. You just need to know, if I give it the right kind of input, it'll give me back an input that satisfies the contract that I set up.
比如计算平方根,我会用一段代码来说明,我将给它命名,并且忽略细节,意思就是在这一段计算过程中,你不用知道它做了什么,你只需知道,如果我进行了正确的输入,它将会给我符合条件的输出。
应用推荐