We are given an array. Our task is to find pairs in array whose sums already exist in array in C++. For example, Input: 3 5 7 2 8 9 Output: 3 5 5 2 7 2 3 2 Find pairs in array whos.... Read More
Today, in this tutorial, we will get to know how to count the number of different characters between two strings of equal length in C++. The number of different characters in a str.... Read More
In this article, we are going to discuss how to kill a process using PID with a help of a C++ program. Each process is uniquely identified using a process id or PID which is repres.... Read More
A string is a continuous sequence of characters. In order to perform some operations on the strings we iterate over the characters of a string. In this article, we are going to dis.... Read More
In this tutorial, we are going to print the left view of a Binary Tree in C++. Left View of a Binary Tree The left view of a Tree is a set of nodes visible when the tree is looked .... Read More
Here we will see how can we find the size of a given array if the size is not known. Using sizeof() operator: The sizeof() operator returns the size of any data type passed to it. .... Read More
In this tutorial, we will learn how to implement static keyword in C++. The keyword ‘static’ in C++ is used with variables and member functions. Static local variable.... Read More
In this tutorial, we will learn how to implement the priests and devils puzzle/game using C++. PROBLEM: You are given that there are 3 priests and 3 devils who have to cross a rive.... Read More