Skip to content

Category Archives: C++ Programs

Given an array arr[] of N elements, the task is to count all the elements which are a multiple of their set bits count.Examples:   Input… Read More
Vectors are same as dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled… Read More
The std::greater is a functional object which is used for performing comparisons. It is defined as a Function object class for the greater-than inequality comparison.… Read More
What are we going to do here? This article explains how to create a super-fast Artificial Neural Network that can crunch millions of data points withing… Read More
In this article, we will discuss some of the mathematical function which is used to derived the value of Pi(π) in C++. Method 1: Using… Read More
C++ allows users to use the concept of Run-Time Polymorphism using Virtual Functions for any type of Inheritance . Below is how to implement Run-Time… Read More
This article shows how to convert a vector to a set in C++. Example:Want to learn from the best curated videos and practice problems, check… Read More
Given an integer N, the task is to find the Nth natural number with exactly two bits set. Examples:   Input: N = 4 Output: 9 Explanation: Numbers with exactly… Read More
Given a sorted array arr[], the task is to find minimum elements needed to be inserted in the array such that array forms an Arithmetic… Read More
Prerequisites: Ordered Set and GNU C++ PBDS Given an ordered set set and a key K, the task is to find the upper bound and lower… Read More
Queue in STL are a type of container adaptors which operate in a first in first out (FIFO) type of arrangement where elements are inserted… Read More
Given string str of size N, the task is to remove all the characters from the string that have odd frequencies. Examples: Attention reader! Don’t stop… Read More
Before moving forward with using const with Reference to a Pointers, let us first see what they are one by one: Pointers are used to… Read More
The task is to implement a custom vector class similar to the STL vector with following functions:   int push_back(data): adds an element(of any data_type) to… Read More
The std::boost::is_array template of Boost C++ Library used to check whether the given type is an array type or not. It returns a boolean value… Read More

Start Your Coding Journey Now!