Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Misc
8.8K+ articles
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
C++
4.3K+ articles
Competitive Programming
3.3K+ articles
Sorting
1.8K+ articles
STL
1.3K+ articles
cpp-vector
375+ articles
cpp-pair
76 posts
Recent Articles
Popular Articles
How to Create a Vector of Vectors of Pairs in C++?
Last Updated: 06 February 2024
In C++ STL, we can nest different containers into each other at any number of levels. On such container is the Vector of Vectors of Pairs i.e. 2D vector of pairs.In this a...
read more
STL
cpp-vector
C++
C++ Programs
cpp-pair
Picked
CPP Examples
How to Iterate Over a Set of Pairs in C++?
Last Updated: 02 February 2024
In C++, a set is a container that stores unique values in some specified order while pairs are data structures that store key-value pairs. In this article, we will look at...
read more
C++
C++ Programs
cpp-set
cpp-pair
Picked
CPP Examples
How to Iterate Over a Vector of Pairs in C++?
Last Updated: 02 February 2024
In C++, vectors are dynamic arrays that allow users to store data in a contiguous memory location while pairs are data structures that allow the users to store two heterog...
read more
cpp-vector
C++
C++ Programs
cpp-pair
Picked
CPP Examples
Group Vector of Pair Elements in Multimap
Last Updated: 01 February 2024
Multimap stores key-value pairs and for the same key, we can have more than one value i.e. multiple values for a single key. We can use this property of multimap to group ...
read more
cpp-vector
C++
C++ Programs
cpp-pair
cpp-multimap
Picked
CPP Examples
How to Insert Pairs into a Map in C++?
Last Updated: 29 January 2024
In C++, maps are STL containers that store key-value pairs and maintain the element's order according to their keys. Pairs also store the data as key values. In this artic...
read more
STL
C++
C++ Programs
cpp-map
cpp-pair
Picked
CPP Examples
How to Sort a List of Pairs in C++?
Last Updated: 25 January 2024
In C++, the pair container allows the users to store two different types of objects as a single unit. We can store the pairs in a list if we want to store multiple pairs i...
read more
STL
C++
C++ Programs
cpp-pair
cpp-list
Picked
CPP Examples
How to Convert Map to a Vector of Pairs in C++?
Last Updated: 25 January 2024
In C++, map containers allow us to store the data in key-value pairs. There might be some cases where you want to convert an entire map into a vector of pairs. In this art...
read more
STL
cpp-vector
C++
C++ Programs
cpp-map
cpp-pair
Picked
CPP Examples
Count Pairs with equal elements and Divisible Index Sum
Last Updated: 09 December 2023
Given an array arr[] of length N and an integer k. You have to return the count of all the pairs (i, j) such that:arr[i] == arr[j]ij(i+j) is divisible by kExamples:Input: ...
read more
Arrays
cpp-pair
Geeks Premier League
DSA
Geeks Premier League 2023
Count ways to choose Triplets of Pairs such that either first or second values are distinct
Last Updated: 23 January 2023
Given an array of pairs arr[] of size N (N ? 3) where each element of pair is at most N and each pair is unique, the task is to determine the number of ways to select trip...
read more
Arrays
combinatorics
Mathematical
Combinatorial
cpp-pair
DSA
Check if every pair in Array B follows the same relation as their corresponding values in A
Last Updated: 02 May 2022
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 the following conditions:Every element in A at index i, wi...
read more
Arrays
Greedy
Sorting
cpp-pair
DSA
Sorting Vector of Pairs by 1st element in ascending and 2nd element in descending
Last Updated: 20 February 2023
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 vector of pairs.While solving problem...
read more
Sorting
cpp-vector
C++
Data Structures
cpp-pair
DSA
Deque of Pairs in C++ with Examples
Last Updated: 30 December 2021
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 implies, a deque allows insertion and deletion ...
read more
C++
cpp-pair
cpp-deque
deque
Multimap of pairs in C++ with Examples
Last Updated: 27 December 2021
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 is implemented as a red-black ...
read more
STL
C++
cpp-pair
cpp-multimap
Sorting 2D Vector of Pairs in C++
Last Updated: 20 February 2023
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, It is a matrix implemented with the help of vectors.W...
read more
Sorting
STL
cpp-vector
C++
cpp-pair
DSA
2D Vector of Pairs in C++ with Examples
Last Updated: 28 July 2022
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 memory locations so ...
read more
cpp-vector
C++
cpp-pair
1
2
3
4
5
6
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !