Posts from C++

Count set bits in an integer using Brian Kernighan Algorithm in C++

By Ayush Singh

This article will guide you on how to write an efficient program to count the number of 1s in the binary representation of an integer using Brian Kernighan’s algorithm in C++.... Read More

return vs exit() in main() in C++ with examples

By Siddharth Raja

In this tutorial, we will see the difference between using exit() and return inside the main() function. In C++ return is a keyword that returns the flow of execution to the callin.... Read More

C++ Program to check if a matrix is invertible

By Shoif Md Mia

The first necessary condition for a matrix to have an inverse is, the matrix has to be a square matrix (m*n matrix is not allowed). The matrix has to be of order n*n. Suppose we ha.... Read More

HSV to RGB in C++

By Amit Raja Kalidindi

In this tutorial, we are going to learn how to convert HSV to RGB in C++. HSV(hue, saturation, value) and RGB(red, green, blue) are color models used for various purposes such as g.... Read More

Given two linked lists, count pairs with sum X in C++

By Muskaan Singla

We are given a problem statement as: given two linked lists, count pairs with sum X in C++. Basically, we are given two linked lists and we have to count the number of such pairs, .... Read More

Input Iterators in C++

By Mohammad Mustafa

In the case of various input operations in C++, we use input iterators. Each value is pointed by the iterator once and the iterator gets incremented. There are 5 main types of iter.... Read More

Find Absolute value (abs) without branching in C ++

By Mainak Halder

Hello Everyone, Hope Everyone’s well. Today is all about finding the absolute value of a number but without branching in C++. Absolute value (abs) without branching in C ++ E.... Read More

How to find Largest triplet product in a stream in C ++

By Mainak Halder

Hello Students, Today We are going to talk about how to find the largest triplet product in a stream in C++.   Implementing Largest Triple Product in a Stream in C++ We need t.... Read More

Related Posts