The second question I want to ask is what's the base case? When do I get down to a problem that's small enough that it's basically trivial to solve? Here it was lists of size one. I could have stopped at lists of size two right. That's an easy comparison.
第二个问题是什么是基础条件?,我要将问题分解到何时才使得问题,小到可以解决的基本问题?,这里是当列表的长度为1有时候,我也可以在长度为2的时候停止分解,那是一个非常简单的对比。
应用推荐