鉴于这里的代码,如果我想移动N个圆盘,我该怎么做?
Given the code up there, if I want to move a tower of size n, what do I have to do?
因此我想,我的团队会说,当她开始敲打她的钢笔并且她的腿开始快速地移动,那就是时候要往前推进了。
So I think my team would say that when she starts tapping her pen and the leg starts moving quickly, that it's time to move on.
例如当我想让一个物体像相反的方向移动,我首先需要让它慢下来,然后在推动它向另外一个方向移动。
If I wanted to reverse an object's momentum, I first had to slow it down before I could get it moving in the opposite direction.
Given the code up there, if I want to move a tower of size n, what do I have to do?
鉴于这里的代码,如果我想移动N个圆盘,我该怎么做?
N And we can keep doing"T","A","N", ? and I think you see where it is going.
然后接着移动字母,T,A,和,我想大家应该知道后面是哪些字母了吧。
If I want to move this stack here, I'm going to take a stack of size n minus 1 move it to the spare spot, now I can move the base disk over, and then I'm going to move that stack of size n minus 1 to there. That's literally what I did, OK?
如果我想移动这些圆盘,我先把从n-1个圆盘1,移动到多余的柱子上去,这样我就能把最底下的圆盘放到这儿了,然后再把从n-1个圆盘放到这儿来,这就是确切的我怎么做的对不对?
应用推荐