## 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…

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. The concept of the tree in Computer Science is similar to a real-life tree.…

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, we traverse a tree level by level. After each level completion, we calculate the…