Suppose we rip out my lungs, and put in Johns' lungs, I've gotten a lung transplant, it's still me.
结社我的肺被拿出来,把约翰斯的肺放进去,我接受了肺移植,那还是我。
If I get a liver transplant, so here I am and we take out my liver and we put Johns' liver inside.
如果我接受了肝脏移植,我的肝脏被拿出来,把约翰斯的肝脏放进去。
Now, the strategy here is pretty clear. As often is for the continuous problem. What's the strategy? I pour in the gold till I run out of gold.
现在我们的战略已经很明显了,对连续性问题战略是怎么样的?,我先把所有金子,装进去。
So, I'm not going to waste your time by asking what happens if you put it in.
我不会问你们把式子带进去以后怎么算,这完全是浪费时间
The people who are in the know -know who's trustworthy as a borrower and who has a good prospect of paying it back -but if I go in there ignorantly, I'm going to get stuck with the worst stuff.
那些行家老手们,就知道哪些借款人是可信的,钱借给谁还款的把握比较大,但如果我懵然不知就把钱投进去了,就可能会落得个血本无归的结果
Now,when I think about this,and again, I'm inviting you to think about this in the first person, so this is happening to you.
当我想到这个问题,我再次请各位把自己代入进去,把这当作发生在你身上的事情。
The next line says if the weight of i is greater than a w, well then I know I can't put it in.
下一行说的是,如果i的重量比a,w大,好吧,我知道我不能把它放进去。
So I'm going to be asking you to put yourself in the first person.
所以我现在请大家把自己代入进去。
Suppose we rip out my heart and put Johns' heart in here.
假设我的心脏被拿出来,把约翰斯的心脏放进去。
OK, so how can I code this up? Well, you might think, let's just jump in and write some code, I don't want to quite do that though, because I want to show you another tool that's valuable for thinking about how to structure the code, and that is a something called a flow chart. Now.
好,那么我怎么把这个以代码实现呢,你可能会想,让我们进去直接写代码把,但是我不想这么做,因为我想教给大家另外一项很有价值的,用来组织代码的工具,叫做流程图,现在,像Guttag教授,和我这么大岁数的人。
应用推荐