# Data Structure

A Data Structure is a storage that is used to store and organized data.

## Reverse The Array With Examples

Reverse The Array is a Data Structure problem which already asked in most of the interviews. In this tutorial we will learn about it with some examples in different-different languages. See below. What it means by Reverse the array? You already know about the “Reverse” it means opposite of that thing for which we want …

## Largest element in an Array with examples

In this tutorial we will learn How to Find Largest Element in an Array with some examples. The largest element is the element which is greater than all the other elements inside the array. Explanation:1. Create a method which takes an array.2. Declare a int variable and assign the first value of the array.3. Iterate …

## Maximum Product Subarray In Java Data Structure

In this tutorial we will learn how to get the Maximum Product Subarray In Java. This is a Data Structure Problem which asked in many interviews. Problem? You have an array, find the subarray which elements have the maximum product or the multiplication in Java. Recursion is the best way to solving the Data Structure …

## Printing Root to Leaf Path of a Binary Search Tree Data Structure

In this tutorial we will learn how to print Root to Leaf Path of a Binary Search Tree with some examples. What is Binary Search Tree? Binary Search Tree is a node-based data structure which has following properties. Code To Print Root to leaf Nodes Path The following code contains also creating a Binary Search …

## Delete a Node in BST In Data Structure

In this tutorial we will learn how to Delete Node in BST(Binary Search Tree) with example. The example below deletes a node from the BST, See full example below. What is Binary Search Tree? A Binary Search Tree is a node-based binary data structure which has some properties those are below: Example To Delete Node …

## Searching Element in Binary Search Tree(BST)

In this tutorial we will learn how to Search a key or element in Binary Search Tree (BST) with some examples. Search in BST is an important part in data structure. What is Binary Search Tree(BST)? A Binary Search Tree a Node based binary tree data structure which has the following properties.: How to Search …

## Binary Search Tree

In this tutorial we will learn about Binary Search Tree and its operations with some examples. What is Binary Search Tree? BST is node-based binary data structure which has the following properties: Operations in Binary Search Tree Standard BST Problems Some of the standard and basic problems are below which are generally asked in the …

## Binary Search Tree Traversal

In this tutorial we will learn about Binary Search Tree Traversal with examples. We have a Binary Search Tree which is following. Binary Search Tree Traversal Methods There are various methods to traverse the binary search tree. Following are the basic methods used to Traverse the Binary Search Tree. 1. Inorder Traversal Explanation: Recursion is …

## Creating a Binary Search Tree

In this tutorial we will learn how to Create a Binary Search Tree with examples. The below diagram represents the Binary Search Tree. How to Create Binary Search Tree You can Create A Binary Search Tree using its fundamentals which are below: Implementation The process is implemented Recursively. Which is very simple to use. We …

## Diameter of a Binary Tree

The Diameter of a Binary Tree or Width of a Binary Tree is the number of nodes on the longest path between two end nodes. The diagram below shows the diameter 9 of the tree the leaves that forms ends of the longest path are in shaded (The longest path is 9). Explanation: 1. The …

## Height of a Binary Tree

This tutorial explains the Height of the Binary Tree with some examples. In the following example there is a B Tree given, We have to find the Height of The Tree. What is the Height of The Binary Tree? The Height of a Tree Is equal to the largest numbers of edges from the Root …

## Binary Tree Data Structure With Examples

A Binary Tree is defined as a Tree Data Structure where each node (left and right ) has only 2 children. Since each element in a Tree can have only 2 children, we typically named them left and right child. Binary Tree Representation A Binary Tree is represented by the topmost Node (Commonly known as …

## Binary Tree Insertion With Example

In this tutorial we will perform an operation of Insertion of Node in Binary Tree. With some examples we will learn about it. Complete Example To Insert A Node in B Tree In the below example first we created a Tree then printing it using the Preorder Traversal then inserting a node in the existing …

## Binary Tree Traversal Data Structure

In this tutorial we will learn how to Traverse a Binary Tree in different Traversal modes ways with some examples. What is Binary Tree Traversal? We get the values or elements of Binary Tree by Traversing it. Often we wish to process a binary tree “by visiting each of its nodes”. Mode of Binary Tree …

## What is Recursion?

In this tutorial we will learn What is Recursion and how to use it with some examples. Recursion is a widely used phenomenon in computer science used to solve complex problems by breaking them down into simpler ones. It is the process by which a function calls itself directly or indirectly. The corresponding function is …

Scroll to Top