Skip to content

Tag Archives: cpp-pair

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
In this article, we will discuss the implementation of the lower_bound() and upper_bound() in a list of pairs. lower_bound(): It returns an iterator pointing to… Read More
In this article we will discuss the implementation of the lower_bound() and upper_bound() in an array of pairs. lower_bound(): It returns an iterator pointing to… Read More
Pairs in C++: The pair container is a simple container defined in <utility> header consisting of two data elements or objects. The first element is… Read More
Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values… Read More
Prerequisite: set lower_bound() function in C++ STL, set upper_bound() function in C++ STL lower_bound() returns an iterator pointing to the first element in the range… Read More
Prerequisite: map lower_bound() function in C++ STL, map upper_bound() function in C++ STL In this article, we will discuss the implementation of the lower_bound() and… Read More
Priority Queue: Priority queue is the extension of the queue in which elements associated with priority and elements having higher priority is popped first. Priority… Read More
Here we will discuss the implementation of the lower_bound() and upper_bound() in vector of pairs.  lower_bound():  It returns an iterator pointing to the first element… Read More
Given two positive numbers N and M, the task is to check whether the given pairs of numbers (N, M) form a Betrothed Numbers or… 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 an array arr[] containing N points and a reference point P, the task is to sort these points according to their distance from the… Read More
Stack in STL Stacks are a type of container adaptors with LIFO(Last In First Out) type of working, where a new element is added at… Read More
Given an array arr[] and two integers K and D, the task is to find exactly K pairs (arr[i], arr[j]) from the array such that… Read More

Start Your Coding Journey Now!