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
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Sign In
▲
Similar Topics
DSA
22.5k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
C++
4.2k+ articles
C++ Programs
2.4k+ articles
Competitive Programming
2.3k+ articles
Searching
1.7k+ articles
Hash
1.2k+ articles
STL
1.2k+ articles
CPP Examples
700+ articles
cpp-set
190+ posts
Popular Articles
Recent Articles
How to Access Elements in Set by Index in C++?
Last Updated: 08 November 2024
In C++, elements of a set cannot be accessed directly by index or position. However, we can work around this limitation using iterators. In
...read more
Technical Scripter
STL
C++
C++ Programs
cpp-set
Picked
Technical Scripter 2022
CPP Examples
Different ways to iterate over a set in C++
Last Updated: 14 February 2023
Sets are a type of associative container in which each element has to be unique because the value of the element identifies it. The values a
...read more
Misc
C++
cpp-set
How to convert a Vector to Set in C++
Last Updated: 01 June 2022
This article shows how to convert a vector to a set in C++.Example:Input: vector = {1, 2, 3, 1, 1}Output: set = {1, 2, 3}Input: vector = {1,
...read more
Algorithms
Mathematical
Competitive Programming
cpp-vector
Programming Language
C++
Data Structures
C++ Programs
cpp-set
DSA
Similar Topics
DSA
22.5k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
C++
4.2k+ articles
C++ Programs
2.4k+ articles
Competitive Programming
2.3k+ articles
Searching
1.7k+ articles
Hash
1.2k+ articles
STL
1.2k+ articles
CPP Examples
700+ articles
How to Delete an Element from the Set in C++?
Last Updated: 18 November 2024
In C++, the set container stores unique elements in the sorted order and the deletion operation should not disrupt this sorted order.C++ pro
...read more
STL
C++
C++ Programs
cpp-set
CPP Examples
set::count() Function in C++ STL
Last Updated: 22 October 2024
The std::set::count() is a built-in function in C++ STL which is used to count the number of times an element occurs in the set container. s
...read more
STL
CPP-Functions
C++
cpp-containers-library
cpp-set
Set upper_bound() in C++ STL
Last Updated: 19 November 2024
In C++, theset upper_bound()is a built-in method used to find the first element in the set that is just greater than the given value. In thi
...read more
STL
CPP-Functions
C++
cpp-containers-library
cpp-set
set::lower_bound() Function in C++ STL
Last Updated: 24 October 2024
Thestd::set::lower_bound() method is used to find the first element in the set that is equal to or greater than the given value. It is a mem
...read more
STL
CPP-Functions
C++
cpp-set
set::insert() function in C++ STL
Last Updated: 04 October 2024
The std::set::insert() is a built-in function of C++ STL set container which is used to insert new elements in it. In this article, we will
...read more
STL
CPP-Functions
C++
cpp-set
set find() Function in C++ STL
Last Updated: 13 February 2025
The std::set::find() is a built-in function in C++ STL that is used to find an element in the set container. It is a member function of std:
...read more
STL
CPP-Functions
C++
cpp-set
set vs unordered_set in C++ STL
Last Updated: 10 November 2022
Differences : | set | unordered_set---------------------------------------------------------Ordering |
...read more
Hash
Binary Search Tree
STL
C++
Difference Between
cpp-unordered_set
cpp-set
DSA
Ordered Set and GNU C++ PBDS
Last Updated: 19 November 2019
Prerequisite :Basic knowledge of STL and Sets Data structure. About ordered set Ordered set is a policy based data structure in g++ that k
...read more
Advanced Data Structure
Technical Scripter
Competitive Programming
C++
cpp-set
DSA
set::begin() and set::end() in C++ STL
Last Updated: 24 October 2024
In C++, std::set::begin() and std::set::end() are built-in functions used to retrieve set::iterators to the beginning and the end of the set
...read more
STL
C++
cpp-containers-library
cpp-set
set::erase in C++ STL
Last Updated: 18 September 2024
In C++, the std::set::erase() is a built-in member function of std::set container that is used to remove the element(s) from the container.
...read more
STL
CPP-Functions
C++
cpp-set
set::size() in C++ STL
Last Updated: 04 November 2024
In C++, set::size() function is a built-in used to find the number of elements in the given set container. It is the member function of std:
...read more
STL
C++
cpp-containers-library
cpp-set
Set in C++ STL
Last Updated: 05 April 2025
In C++, sets are associative container which stores unique elements in some sorted order. By default, it is sorted ascending order of the ke
...read more
STL
C++
cpp-containers-library
cpp-set
1
2
3
4
5
6
7
8
>>
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 !