Posts from C++

Run length encoding of the string in C++

By Manisha Rathore

In this tutorial, we will learn to find run length encoding of a string in c++. For Example:  Given string: “ssshhhhhaiiiiillllll” Now, encode the length of every char.... Read More

Reverse a string using stack in C++

By Manisha Rathore

In this tutorial, we will learn to reverse a string using the stack in C++. For Example: Given string: " codespeedy" Reverse the given string. Output: " ydeepsdoc'' Simple Method: .... Read More

print the pyramidical star pattern in C++

By Manisha Rathore

In this tutorial, we will learn to print the pyramidical star pattern in C++. For Example: If n=5. The output: * * * * * * * * * * * * * * * Approach: Firstly, it is a star pattern.... Read More

Replace the element with the greatest element on the right side of an array in C++

By Manisha Rathore

In this tutorial, we will learn to replace the element with the greatest element on the right side in C++. Also, we have given an array and we have to replace the element with the .... Read More

Find a pair with the given difference in C++

By Manisha Rathore

In this tutorial, we will learn to find a pair with the given difference in C++. Also, we have given an array and a number n and our task is to get the pair whose difference is the.... Read More

How to push all zeroes to the end of the array in C++

By Manisha Rathore

In this tutorial, we will learn to push all zeroes to the end of an array in C++. As we have given an array and we have to shift zeroes to the end of the array. For Example:  Give.... Read More

Count pairs in array whose sum is divisible by K in C++

By Manisha Rathore

In this tutorial, we will learn how to count pairs in an array whose sum is divisible by K in C++. Also, given an array and a number K, and we have to count pairs. For example: Giv.... Read More

Topological Sort in C++

By Pritam Hande

In this tutorial, we will learn about topological sort and its implementation in C++. Before that let’s first understand what is directed acyclic graph. Directed Acyclic Grap.... Read More

Related Posts