Get the Sum of all left leaves in a Binary tree by SJ · December 6, 2015 Objective: Given a binary tree, find the sum of all the nodes which are left as well as leaves nodes. Example: Get the Sum of all left leaves in a Binary tree. Approach: Approach is quite simple. Do the inorder traversal check if node if the left child and leaf node. If yes then add it to the sum. See the code for more understanding. Complete Code:Run This Code Run This Code Output: Sum of left leaves: 21 __________________________________________________ Top Companies Interview Questions..- Google Microsoft Amazon Facebook more.. If you find anything incorrect or you feel that there is any better approach to solve the above problem, please write comment. __________________________________________________ Related Posts:Top 25 Interview Problems on Binary Trees/Binary Search TreesGraph – Depth First TraversalHeap Sort – Java ImplementationDjkstra’s – Shortest Path Algorithm (SPT)Graph – Print all paths between source and destinationPrim’s – Minimum Spanning Tree (MST) |using Adjacency List and Priority Queue…Graph Implementation – Adjacency List – Better| Set 2Least Recently Used (LRU) Cache – Using HashMap and Doubly Linked List | Set 1Graph – Depth First Search using RecursionKruskal’s Algorithm – Minimum Spanning Tree (MST) – Complete Java…Share this:LinkedInGooglePrintTumblrFacebookTwitterEmailRedditLike this:Like Loading...