题解 | #完全二叉树结点数#
完全二叉树结点数
http://www.nowcoder.com/practice/512688d2ecf54414826f52df4e4b5693
这个有意思了:
class Solution: def nodeNum(self , head ): # write code here if head: return self.nodeNum(head.left) + self.nodeNum(head.right) + 1//简单易理解 else: return 0