Live Batches
Masterclasses
Menu
Free Courses
Account
Login / Sign Up
Problem Submissions Solution

Count Leaf Nodes In Binary Tree

Difficulty: Medium

Acceptance: 74.59%

Points: 30.00

You are given the **root** of a binary tree. Your task is to count and return the number of leaf nodes in the binary tree. A **leaf node** is a node with no left or right child.

Topics

Companies

Articles

Examples:
Constraints:
  • - 0 = Number of nodes = 105
  • - -10? = Node.data = 10?
Companies:
Microsoft Cisco Wayfair
Topics:
Tree Traversal Binary Tree
Locked Content
Access Restricted: Please Login to access the code editor and test cases.