Posts from C++

C++ program to print next greater number of Q queries

By Sonal Bera

In this tutorial, we will write a code to display the greater number of Q queries in an array in C++. What this means is that, say we have an array with elements. The next greater .... Read More

Implementation of Pigeonhole Sort in C++

By Saksham Agarwal

In this blog, we’ll be talking about how to implement PigeonHole Sort in C++. PigeonHole Sort Pigeon Hole algorithm is a nice algorithm to use when the number of elements is .... Read More

Convert a map to a vector in C++

By Abhishek Sharma

This is a tutorial on how to convert a map to a vector in C++. Maps are used to store key-value pairs in an ordered way. And so, to store these we need a vector of paired values. S.... Read More

How to clear/empty priority_queue of objects in C++

By Abhishek Sharma

In this tutorial, I will show you how you can clear/empty priority_queue of objects in C++. Since there is no inbuilt function in priority_queue to clear/empty it, thus we will see.... Read More

Rearrange array such that elements at even positions are greater than odd in C++

By Abhishek Sharma

Hello there! In this tutorial, we will rearrange elements of an array such that elements at even positions are greater than odd positions. e.g. int arr[]={15,12,13,18,5,9}; // for .... Read More

Precision of floating point numbers in C++

By Baba Yaga

The floating-point numbers can be represented using double, float and long double in C++. Let’s see what’s the difference between using float and double? The C++ provid.... Read More

C++ program to check if removing an edge can divide a Binary Tree into two halves

By Pratyush Gupta

In this tutorial, we will learn how to check if removing an edge can divide a Binary Tree into two halves. Rather than just getting directly to the solution lets us discuss the bas.... Read More

Written version of Logical Operators in C++

By Aakash Puri

In this tutorial, you are going to learn about the keywords that can be used in place of logical operators. So let’s discuss the all logical operators one by one and how to i.... Read More

Related Posts