Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* like naive solution*/
- private int count(TreeNode node) {
- return node != null ? 1 + count(node.left) + count(node.right) : 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement