# 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