Skip to content

Tag Archives: cpp-pair

Given two Arrays A[] and B[] each of size N, the task is to check if the given arrays are valid or not, based on… Read More
A pair is a container that stores two values mapped to each other, and a vector containing multiple numbers of such pairs is called a… Read More
What is a deque? In C++, the deque is a sequence container and it is also known by the name, double-ended queue. As the name… Read More
What is a multimap? In C++, a multimap is an associative container that is used to store elements in a mapped fashion. Internally, a multimap… Read More
A 2D vector also known as vector of vectors is a vector in which each element is a vector on its own. In other words,… Read More
What is pair? Utility header in C++ provides us pair container. A pair consists of two data elements or objects.  The first element is referenced… Read More
What is Multiset? A multiset is an associative container that can hold a number of elements in a specific order. Unlike a set, a multiset… Read More
What is Vector? In C++, a vector is similar to dynamic arrays with the ability to resize itself automatically. Vector elements are stored in contiguous… Read More
Forward List Forward list in STL implements singly linked list. Introduced from C++11, forward lists are more useful than other containers in insertion, removal, and… Read More
Given an array of pairs A[][] of size N, the task is to find the longest subsequences where the first element is increasing and the… Read More
Given two arrays arr[] and jump[], each of length N, where jump[i] denotes the number of indices by which the ith element in the array… Read More
Given a 2D array segments[][] where each segment is of the form [L, R] representing (X, Y) co-ordinates, the task is to find a segment… Read More
Given an array arr[] consisting of N integers and an integer X, the task is to perform integer division on the array elements by X… Read More
Given two arrays A[ ] and B[ ] consisting of N integers, where Ai denotes the quantity of sweets of the ith type and Bi… Read More
Given a 2D array ranges[][] of size N * 2, with each row representing a range of the form [L, R], the task is to… Read More

Start Your Coding Journey Now!