Focus mode
HashSet is a set data type that cannot contain the same values. (collection type)
Per geekforgeeks explanation differences between Hashmap and Hashset:
HashSet is an implementation of Set Interface which does not allow duplicate value. The main thing is, objects that are stored in HashSet must override equals() for check for equality, and hashCode() methods for no duplicate value are stored in our set.
HashMap is an implementation of Map Interface, which maps a key to value. Duplicate keys are not allowed in a Map. HashMap allows null values and null keys. Both HashSet and HashMap are not synchronized.
To understand hashset in more detail, additional resource can be found here:
https://www.youtube.com/watch?v=UzxugFpv0dI
You can find detailed further information from Rust Official documentation: https://doc.rust-lang.org/std/collections/struct.HashSet.html
Resource:
https://www.geeksforgeeks.org/difference-between-hashmap-and-hashset/
Programs to Accelerate Your Progress in a Software Career
Join our 4-8 month intensive Patika+ bootcamps, start with the fundamentals and gain comprehensive knowledge to kickstart your software career!
You need to enroll in the course to be able to comment!