## Binary Search Tree | Data Structure

Before getting into the Binary Search Tree (BST), you have to know the basics of Tree and Binary Tree. I assume that you have the basic idea of Tree and Binary Tree. Intro A Binary Search Tree is a special…

Before getting into the Binary Search Tree (BST), you have to know the basics of Tree and Binary Tree. I assume that you have the basic idea of Tree and Binary Tree. Intro A Binary Search Tree is a special…

LeetCode 100 It’s an easy LeetCode problem, and the description is concise and straightforward. We can solve this problem using the DFS algorithm. From two binary trees, we have to check whether both are the same or not. Consider the…

LeetCode 230 I hope you already know about Binary Search Tree. In BST, each node is greater than its left subtree and smaller than its right subtree. If we print all the nodes of a BST using an inorder traversal…

LeetCode 102 This problem just simply the implementation of the level order traversal algorithm. If you don’t know about level order traversal yet, you can check my blog on this topic. As we know, using level order traversal, we traverse…

LeetCode 104 It’s a common and basic type of problem. The problem title is self-explanatory. We all know about a binary tree. To solve this problem, we have to find the maximum depth of a binary tree. We can solve…

This one is another way of traversing through a binary tree. There are many other ways you can do it. Click here to check. Level order traversal is a binary tree version of the BFS (Breadth-First Search) algorithm. The concept…

There are three Depth First Search (DFS) types of traversal algorithms for Binary Tree. Traversal algorithms are for traversing in a Binary Tree. These three are variations of the Depth First Search (DFS) algorithm. In DFS, we start traversing from…

I have written a blog about the tree data structure overview. If you don’t know about tree data structure, click here to see my blog. In this blog, we will be going to know about Binary Tree. I hope you…

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…

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…