Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
C++
4k+ articles
C++ Programs
2.5k+ articles
Sorting
1.7k+ articles
STL
1.2k+ articles
CPP Examples
700+ articles
cpp-vector
360+ articles
cpp-map
270+ articles
cpp-pair
76 posts
Popular Articles
Recent Articles
unordered set of Pairs in C++ with Examples
Last Updated: 19 December 2021
What is pair?Utility header in C++ provides us pair container. A pair consists of two data elements or objects.The first element is referenc
...read more
STL
C++
cpp-unordered_set
cpp-pair
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
...read more
cpp-vector
C++
cpp-pair
Implementation of lower_bound() and upper_bound() in Array of Pairs in C++
Last Updated: 01 August 2020
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
...read more
Arrays
cpp-array
C++ Programs
cpp-pair
DSA
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
C++
4k+ articles
C++ Programs
2.5k+ articles
Sorting
1.7k+ articles
STL
1.2k+ articles
CPP Examples
700+ articles
cpp-vector
360+ articles
cpp-map
270+ articles
Sorting a Map by value in C++ STL
Last Updated: 29 December 2022
Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped valu
...read more
Sorting
Hash
cpp-vector
C++ Programs
cpp-map
cpp-pair
DSA
Priority queue of pairs in C++ with ordering by first and second element
Last Updated: 01 November 2023
Priority Queue: Priority queue is the extension of the queue in which elements associated with priority and elements having higher priority
...read more
Articles
Queue
Sorting
STL
C++
cpp-pair
cpp-priority-queue
DSA
Implementation of lower_bound() and upper_bound() in Vector of Pairs in C++
Last Updated: 21 July 2022
Here we will discuss the implementation of the lower_bound() and upper_bound() in vector of pairs.lower_bound():It returns an iterator point
...read more
cpp-vector
C++
cpp-pair
Queue of Pairs in C++ STL with Examples
Last Updated: 28 July 2021
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 a
...read more
Queue
STL
Data Structures
C++ Programs
cpp-pair
DSA
Stack of Pair in C++ STL with Examples
Last Updated: 25 March 2020
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 one end a
...read more
Stack
STL
Data Structures
C++ Programs
cpp-pair
DSA
Find K closest elements to given Value in Unsorted Array
Last Updated: 30 April 2024
Given an unsorted array arr[] and two numbers X and K, the task is to find K closest values to X in arr[].Examples:Input: arr[] = {10, 2, 14
...read more
Arrays
Misc
Amazon
Heap
STL
cpp-pair
cpp-priority-queue
DSA
How to create an unordered_map of pairs in C++?
Last Updated: 26 July 2024
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 pair then we have to exp
...read more
Technical Scripter
STL
C++
cpp-unordered_map
cpp-pair
Picked
Technical Scripter 2018
DSA
Least Frequently Used (LFU) Cache Implementation
Last Updated: 02 January 2025
Design a data structure for the Least Frequently Used (LFU) Cache.LFU (Least Frequently Used) Cache is a caching algorithm where the least f
...read more
Amazon
Google
Heap
Hash
cpp-vector
Operating Systems
Data Structures-Heap
cpp-map
cpp-pair
DSA
Sorting an array according to another array using pair in STL
Last Updated: 09 January 2024
We are given two arrays. We need to sort one array according to another. Examples:Input : 2 1 5 4 9 3 6 7 10 8 A B C D E F G H I JOut
...read more
Sorting
STL
cpp-pair
DSA
Map of pairs in STL
Last Updated: 18 October 2017
Map in STL is used to hash key and value. We generally see map being used for standard data types. We can also use map for pairs.For example
...read more
STL
C++
cpp-pair
Pair in C++ STL
Last Updated: 25 April 2025
In C++, pair is used to combine together two values that may be of different data types or same data types as a single unit. The first eleme
...read more
STL
C++
cpp-containers-library
cpp-pair
First non-repeating character of given string
Last Updated: 07 April 2025
Given a string s of lowercase English letters, the task is to find the first non-repeating character. If there is no such character, return
...read more
Strings
Amazon
Morgan Stanley
Goldman Sachs
D-E-Shaw
Accolite
Payu
MAQ Software
MakeMyTrip
InfoEdge
Ola Cabs
OATS Systems
Teradata
Tejas Network
cpp-pair
DSA
1
2
3
4
5
6
>>
Last
1
2
3
4
5
6
>>
Last
1
2
3
4
>>
Last
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 !