Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.5K+ articles
Misc
7.7K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Strings
2.1K+ articles
Searching
1.0K+ articles
Hash
831+ articles
frequency-counting
745+ articles
cpp-set
202+ articles
HashSet
69 posts
Recent Articles
Max Money Exchange with n/2, n/3, and n/4
Last Updated: 08 July 2026
Ritika has a coin worth n dollars. she can exchange any coin worth n at the bank into three separate coins worth n/2, n/3, and n/4 (each value rounded down, i.e., integer...
read more
DSA
HashSet
Algorithms-Dynamic Programming
Number Divisibility
Minimum Increments To Make Palindrome
Last Updated: 08 July 2026
Given an array of integers arr[] and an integer k. You may freely shuffle the elements of the array and shuffling is not counted as an operation.Find the minimum of number...
read more
DSA
palindrome
HashSet
Arrays
Distance Travelled in a Permutation of 1 to n
Last Updated: 03 July 2026
Given an array arr[] consisting of a permutation of the set [1, 2, 3, …, n] for some positive integer n. Find the total distance you must travel starting from the position...
read more
DSA
HashSet
Arrays
What is the difference between Set vs Hashset in C++?
Last Updated: 23 July 2025
In C++, both set and HashSet(also called unordered_set) are used to store elements but they have different properties and use cases. In this article, we will learn the key...
read more
C++ Programs
C++
Picked
STL
HashSet
cpp-unordered_set
cpp-set
CPP Examples
How to Convert List of Lists to HashSet in Java?
Last Updated: 23 July 2025
In Java, Collections like lists, and sets play a crucial role in converting and manipulating the data efficiently. The Conversion of a List of Lists into a HashSet is main...
read more
Java
Java Programs
Picked
HashSet
java-hashset
java-list
Java Examples
How to Convert a HashSet to JSON in Java?
Last Updated: 23 July 2025
In Java, a HashSet is an implementation of the Set interface that uses a hash table to store elements. It allows fast lookups and does not allow duplicate elements. Elemen...
read more
Java
Java Programs
Picked
HashSet
java-hashset
JSON
Java-JSON
Java Examples
How to Create a HashSet with a Custom Initial Load Factor in Java?
Last Updated: 23 July 2025
Java HashSet is a simple data structure provided by the Java Collection Framework that provides efficient storage and enables the storage of unique objects. One of the par...
read more
Java
Java Programs
Picked
HashSet
java-hashset
Java Examples
How to Create Subsets of a HashSet based on Specific Criteria in Java?
Last Updated: 23 July 2025
In Java, HashSet provides a dynamic collection of unique elements. Sometimes, we may need to create subsets of a HashSet based on specific criteria. In this article, we wi...
read more
Java
Java Programs
Picked
HashSet
java-hashset
Java Examples
How to Serialize and Deserialize a HashSet in Java?
Last Updated: 23 July 2025
Serialization is the technique of converting an object's state into a byte stream. The main purpose of serialization is to save the state of an object so that it can be re...
read more
Java
Java Programs
Picked
HashSet
java-hashset
Java Examples
How to Convert List of Lists to HashSet in Java Using Lambda Expression?
Last Updated: 23 July 2025
A lambda expression is a short code block that accepts parameters and outputs a result. Similar to methods, lambda expressions can be used directly within the body of a me...
read more
Java
Java Programs
Picked
HashSet
java-hashset
Java-Collections-Class
Java Examples
How to Create a HashSet With a Predefined Capacity in Java?
Last Updated: 23 July 2025
In Java, we can create HashSet with a predefined capacity by creating a constructor and passing the capacity as a parameter to it. We have to initialize the capacity using...
read more
Java
Java Programs
Picked
HashSet
java-hashset
Java Examples
Deep Copy of a HashSet in Java
Last Updated: 23 July 2025
HashSet is used to store a unique set of values in Java. It is a class that stores values and provides efficient access. As we know Java uses call-by-reference. So, if we ...
read more
Java
Java Programs
Picked
HashSet
java-hashset
Java Examples
How to Iterate Over a HashSet Without an Iterator in Java?
Last Updated: 01 February 2024
In Java, we can iterate over a HashSet without using an Iterator. For this, we need two methods. We can directly loop through the elements of the HashSet.In this article, ...
read more
Java
Java Programs
Picked
HashSet
java-hashset
Java Examples
How to Implement a Bidirectional Map Using Two HashSets in Java?
Last Updated: 23 July 2025
Bidirectional maps are also known as two-way maps or dual maps. These provide a convenient way to establish a relationship between keys and values in both directions. In J...
read more
Java
Java Programs
Picked
HashSet
java-hashset
Java Examples
Convert a HashSet to a LinkedList in Java
Last Updated: 23 July 2025
In Java, HashSet and LinkedList are linear data structures. These are majorly used in many cases. There may be some cases where we need to convert HashSet to LinkedList. S...
read more
Java
Java Programs
Picked
Linked Lists
Java-Collections
HashSet
Java Examples
1
2
3
4
5
✕