手机扫码访问

导航
您当前的位置:首页 > 高教类 > 工学类
问题:

[单选题]In the video lecture we see a comment in the code: "Two base cases are required". What does it refer to? 视频里代码注释中“需要两个递归基”的含义是P9D答案窝(daanwo.com)-大学作业答案分享平台
AWe need two functions handling different cases (when n is even or odd). 问题需要按照“n为奇数”、“n为偶数”两种情况分别设计两个函数P9D答案窝(daanwo.com)-大学作业答案分享平台
BThe sequence of recursive callls is terminated when the problem size is reduced to either 0 or 1. 在问题规模缩减为0或1时,停止递归P9D答案窝(daanwo.com)-大学作业答案分享平台
CThe program returns to the main function when the problem size is reduced to either 0 or 1. 在问题规模缩减为0或1时,返回main函数(或递归函数被调用的函数)P9D答案窝(daanwo.com)-大学作业答案分享平台
DTwo sub-instances are generated from every instance of the recursive calls. 递归函数在执行过程中将每次创建两个递归实例
答案解析:

相关问题
关于我们 | 用户指南 | 版权声明 | 给我留言 | 联系我们 | 积分商城 | 答案求助 | 网站地图
Copyright © 2020 www.daanwo.com All Rights Reserved