• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compare two HashSet  RSS feed

 
Vince Hon
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two HashSets,
e.g. hs_1, hs_2
I want to compare these 2 hashsets to produce a new one so that hs_1 will not contain elements of hs_2
Are there any efficient method to do this ?
Thanks
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Posting the same question to more than one forum is certainly not the most efficient way to use the 'ranch! The main problem is that ranchers may waste their time giving an answer that has already been provided elsewhere. Please don't.
In any case, I answered your question in Performance.
- Peter
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!