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 sense, it’s not that difficult if you have a basic concept about BST (Binary Search Tree). BST is also a Binary Tree. So what is a Binary Search Tree? […]

# Tag: Binary Tree

## 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 of all nodes with a value in the range. The range is actually a minimum integer and a maximum integer. If a node value is in the range, we […]

## 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 algorithm. I can assume that you have a basic understanding of Tree data structure. Mainly, there are four types of traversing algorithms in Binary Tree. Preorder traversal is one […]

## 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 search on Binary Search Tree (BST). First, we will be given a Binary Search Tree and a value for search. We have to search for the given value in […]

## (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 iterative implementation of tree traversals. TreeNode Class Pre Order Traversal In Order Traversal Post Order Traversal

## 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 blog, we will see only iterative implementation. Pre Order Traversal In Order Traversal Post Order Traversal Level Order Traversal