博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
2019.4.10
阅读量:4168 次
发布时间:2019-05-26

本文共 434 字,大约阅读时间需要 1 分钟。

2019.4.10

private int getNumberOfLeaves(TreeNode
root){
if(root.left == null && root.right == null){
return 1; }else if(root.left == null){
return getNumberOfLeaves(root.right); }else if(root.right == null){
return getNumberOfLeaves(root.left); }else{
return getNumberOfLeaves(root.left) + getNumberOfLeaves(root.right); } }

在这里插入图片描述

转载地址:http://zpzai.baihongyu.com/

你可能感兴趣的文章
java发展史
查看>>
Java内存区域
查看>>
数字签名的原理
查看>>
showDialog
查看>>
Flex 拖拽范例
查看>>
flash builder 4 编译器参数
查看>>
flex常用网站
查看>>
flex 页面跳转
查看>>
cat | wc -l 少一行的问题
查看>>
socket 科普文章
查看>>
Mutex, semaphore, spinlock的深度解析
查看>>
pthread线程使用小结
查看>>
A Game of Thrones(59)
查看>>
2018.3.19
查看>>
A Game of Thrones(97)
查看>>
A Game of Thrones(98)
查看>>
2018.3.20
查看>>
2018.3.21
查看>>
2018.3.22
查看>>
2018.3.23
查看>>