Category Archives: DSA

Height and Depth of Binary Tree

In this tutorial, we will learn how to find height and depth of binary tree with program implementation in C++. It is one of the most commonly used non-linear data structures. We will learn about: What is the height of a binary tree? Algorithm and implementation for finding height of Binary tree What is the… Read More »

Category: DSA

Handshaking Lemma in Graph Theory – Handshaking Theorem

Hello Everyone, Today we will see Handshaking lemma associated with graph theory. Before starting lets see some terminologies.  Degree: It is a property of vertex than graph. Degree is a number of edges associated with a node. Pendant vertices: Vertices with degree 1 are known as pendant vertices. Isolated vertices: Vertices with degree 0 are… Read More »

Category: DSA

Types of Trees in Data Structure

In this article, we will learn about tree and some of the common types of trees in data structure. Tree in computer science is like a tree in the real world, the only difference is that in computer science it is visualized as upside-down with root on the top and branches originating from the root… Read More »

Category: DSA

Tree Traversal – Inorder, Preorder and Postorder

Here you will learn about tree traversal with program example. Tree is a subset of Graph data structure where the number of edges are exactly one less than the number of vertices (nodes). We can call any graph a tree if it does not have any cycle (closed loop). Tree traversal refers to the process… Read More »

Category: DSA

Array vs Linked List – Difference between Array and Linked List

Ever wondered, How data is stored inside the computer’s memory? You can’t just throw data into the memory without making proper structure for the data. To provide a organised structure for the data to get stored inside the computer’s memory so that we can use and manage the stored data in the most efficient way… Read More »

Category: DSA

Types of Queues in Data Structure

Queue is an important structure for storing and retrieving data and hence is used extensively among all the data structures. Queue, just like any queue (queues for bus or tickets etc.) follows a FIFO mechanism for data retrieval which means the data which gets into the queue first will be the first one to be… Read More »

Category: DSA

Types of Data Structures

Data structures are a very important programming concept. They provide us with a means to store, organize and retrieve data in an efficient manner. The data structures are used to make working with our data, easier. There are many data structures which help us with this. Types of Data Structures Image Source Primitive Data Structures… Read More »

Category: DSA

Difference between Linear and Non Linear Data Structure

Here you will learn about difference between linear and non linear data structure. Data structures are basically a way of storing and logically implementing the data elements. These elements need to be stored in a way which makes them orderly and organized. Apart from the primitive data structures which include the int, char, float, double… Read More »

Category: DSA