What's the point of this? Again, now that I can think about things recursively, I can similarly break things down into simpler versions of the same problem. It could be one version.
这些的意思是什么呢?再一次我想说,我既然能够以递归的方式思考了,那么我就可以简单地把问题,转化为更简单的同类问题。
And I would suggest palindrome as a great example of that. That's easy to think about recursively. It's much harder to think about iteratively. And you want to get into the habit of deciding which is the right one for you to use. And with that, we'll see you next time.
其它的问题可能用递归的方式,可以更好的解决,而直接思考可能很困难,这时你就得养成做出,正确选择的好习惯了,下周再见。
应用推荐