Posts from C++

C++ program for Density of Binary Tree in One Traversal

By Deepanjan Bose

In this tutorial, we will generate the density of Binary Tree in one traversal using C++. Before going on our main topic, we should have a clear concept of what Binary tree is and .... Read More

C++ program to Minimize the number of weakly connected nodes

By Punnam Chandnaik

In this tutorial, we will go through the C++ program to Minimize the number of weakly connected nodes. In the end, we will implement the code for it. It is defined as nodes which a.... Read More

Implementation of Bucket sort in C++

By Aranya Banerjee

In this tutorial, you will learn bucket sort in C++ with its algorithm. Bucket sort is a sorting algorithm in which the elements of an array are stored in buckets, wherein they get.... Read More

Boruvka’s algorithm for Minimum Spanning Tree in C++

By Dinesh Kumar

In this tutorial, we are going to learn Boruvka’s algorithm for Minimum Spanning Tree in C++. Here we will learn about the spanning tree and Boruvka’s algorithm. After that.... Read More

Digital Root of Large Integers using Recursion in C++

By Palani M

In this tutorial, we will learn how to calculate the digital root of a given long number i. We will be using a recursive approach for the same. We will learn what a digital root me.... Read More

Babylonian method to find square root in C++

By Nishant Soni

Today we will learn the Babylonian method to find the square root using C++. This method basically originates from the newton-raphson method. We all know what a square root of a nu.... Read More

Find kth smallest element in a Binary Search tree in C++

By Anurag Verma

In this tutorial, we are going to find the kth smallest value in a Binary Search tree in C++. We assume that we are given the root node of the tree and the value of k. We can appro.... Read More

Add custom messages in assert in C++

By Abhishek Kaushik

Hello Friends, In this tutorial, we will look at how to add custom messages in assert in C++. To get an idea of assert please check here Assertion in C++. Let’s see the basic.... Read More