Intro When we hear the word tree before we know the tree of computer science, the image of the tree of real-life floats in our eyes....
Continue reading...Tree
Average of Levels in Binary Tree | LeetCode 637 | Python | Solution
Click here to see the problem details on LeetCode. Pretty simple Binary Tree problem. We can solve this using the Level Order Traversal algorithm. This way,...
Continue reading...Insert into a Binary Search Tree | LeetCode 701 | Python | Solution
Click here to see the problem details. Read the problem details first. Concept This is clearly a Tree related problem and a medium-type problem. In my...
Continue reading...Range Sum of BST | LeetCode 938 | Python | Solution
Click here to see the problem on LeetCode. A simple Tree related problem and description is pretty straightforward. We have to return the sum of values...
Continue reading...Binary Tree Preorder Traversal | LeetCode 144 | Python | Solution
Click here to see the problem on LeetCode. The problem description is pretty straightforward. We have to return all the nodes’ values following the preorder traversal...
Continue reading...700. Search in a Binary Search Tree | LeetCode | Python | Solution
Click here to see the problem in LeetCode. Read the description carefully. This one is a pretty easy problem for you if you know how to...
Continue reading...(Pre|In|Post)Order Traversal In Binary Tree | Recursive Way | Code Snippet
Tree traversal algorithms are easy. Let’s see the Python implementation of these three types of tree traversal in the recursive way. Click here to see the...
Continue reading...4 Types Of Binary Tree Traversal | Algorithm Implementation | Iterative Way | Code Snippet
The tree is one of the most important data structures in computer science. We are going to see the Python implementation of tree traversals. In this...
Continue reading...404. Sum Of Left Leaves | LeetCode | Python | Solution
This problem description is pretty simple. The description is: find the sum of all left leaves in a given binary tree. Here is the link of...
Continue reading...