计算树中叶子的数量 [英] Counting the number of the leaves in tree

查看:97
本文介绍了计算树中叶子的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码是正确的吗?:

This is my code is it correct?:

展开 | 选择 | Wrap | 行号

推荐答案

In你的其他分支,你应该返回值;相反,你只是调用函数而对返回值一无所知。
In your else branch, you should be returning values; instead, you are just calling the function and doing nothing with the return values.


这个是正确的吗?

is this one correct?

展开 | 选择 | Wrap | 行号


后者不起作用!!!!我真的卡住了PLZ的帮助!
this latter don''t work either!!!! am realy stuck plz help!


这篇关于计算树中叶子的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆