Skip to content

Category Archives: C++

The ‘=’ is an operator in C++ STL which copies (or moves) an unordered_multimap to another unordered_multimap and unordered_multimap::operator= is the corresponding operator function. There… Read More
If we wish to delete the last element from a map, we can use following methods : using prev(mp.end()) : what prev function do is,… Read More
Unordered Map does not contain a hash function for a pair like it has for int, string, etc, So if we want to hash a… Read More
Introduction C++, OpenCV and Gtk are a nice triplet to build applications that run on a Raspberry PI, taking images from the camera, process them,… Read More
Introduction This article belongs to a series of articles about writing, building and debugging an application written in C++, that uses Gtk library to handle… Read More
unordered_map is used to implement hash tables. It stores key value pairs. For every key, a hash function is computed and value is stored at… Read More
Give an array of positive integers. The task is to find the total sum after performing the bitwise OR operation on all the sub-arrays of… Read More
Attributes are one of the key features of modern C++ which allows the programmer to specify additional information to the compiler to enforce constraints(conditions), optimise… Read More
Given an integer N, the task is to find the sum of N and it’s maximum prime factor.Examples:   Input: 19 Output: 38 Maximum prime factor of 19… Read More
Given a Set, the task is to traverse this Set in reverse order. Examples: Input: set = [10 20 30 70 80 90 100 40… Read More
The given task is to take an integer as input from the user and print that integer in C++ language. In below program, the syntax… Read More
Map stores the elements in sorted order of keys. Now if we want to traverse it in reverse order we will use reverse_iterator of map. … Read More
CSV is a simple file format used to store tabular data such as a spreadsheet or a database. CSV stands for Comma Separated Values. The… Read More
any is one of the newest features of C++17 that provides a type-safe container to store single value of any type. In layman’s terms, it… Read More