Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 22251

A set is a collection in which no element is repeated, which may be able to enumerate its elements according to an ordering criterion (an "ordered set") or retain no order (an "unordered set").

10 votes
Accepted

Concurrent Linked Hash Set

contract. the interrupted flag is cleared upon interruption since the InterruptedException is caught and the state is not set to interrupted again. not strictly a problem, but you synchronize on this. … This means third party code locking on your Set will influence its behavior. It is preferrable to lock on a private Object. I'm not sure what you mean exactly by 'proper size'. …
bowmore's user avatar
  • 5,359
1 vote

Forming sets from pairs of numbers

The main method would then call three methods  List<Set<Integer>> pairs = parse(input); List<Set<Integer>> clusters = calculateClusters(pairs); print(clusters); …
bowmore's user avatar
  • 5,359