Posts from C++

Comparing sort(), partial_sort() and nth_element() sort() in C++ STL

By Nishant Saxena

In this post, we will be discussing what are the differences between Sort, Partial Sort, and nth_element Sort in C++. sort in C++ This is function provided in C++ STL, which sort t.... Read More

Convert a Singly Linked List to an Array in C++

By Manan Gupta

The task is to convert a Singly Linked List to an Array in C++. A simple example to explain the task can be- input: 10->20->50->40->35->NULL output: 10 20 50 40 35 T.... Read More

Create a single colored blank image in C++ using OpenCV

By Nishant Saxena

We are going to see how to create an image and assign it any single color value in C++ using OpenCV. OpenCV is an open-source C++ library for Image processing and computer vision. .... Read More

Maximum edges that can be added to DAG so that is remains DAG in C ++

By Aniruddha Ghosh

In this article, we will discuss Maximum edges that can be added to DAG so that remains DAG in C ++. You are given a directed acyclic graph(DAG)  and you have to find the maximum .... Read More

Find length of a loop in Linked List using map in C++

By Nishant Saxena

In this tutorial, we will learn how to find length of a loop in Linked List in C++ using map. The objective is to check if in a given Linked List there is a loop if the loop is pre.... Read More

Forward Declaration in C++

By Ramneeq Sodhi

Here we are going to make a C++ program using forward declaration. So what is Forward declaration? Forward declaration refers to a prior declaration of a function, class, variable.... Read More

Find the maximum GCD of the siblings of a Binary Tree using C++

By Richa Sirwani

GCD (Greatest Common Divisor) is the largest number that divides two numbers. In this tutorial, we will find the maximum GCD of the siblings of a binary tree using C++. The vector .... Read More

Mutual Friendship of Classes in C++

By Mallika Gupta

Here in this tutorial, we will learn about what is Mutual Friendship in classes and how it can take place with the C++ code example. It is one of the most famous concepts in Object.... Read More