Q:

Will my programming question currently posted on CR be OK for SO? 

Since my question includes working code I thought it belonged to Code Review and posted it there. 
Apparently it was deemed too hypothetical for their taste. 
Would it be OK to move it to SO? 

A:

The reason why you can't find the right place to post your question is because your problem is not well defined. 
You have posted some code, that returns the union of all the elements in two sets.  But the specification of the method is not there (see my comment on your question: is the returned set supposed to be of a specific type?  sorted in a specific order?  throw an exception in some cases?  etc.). 
Once you have defined that specification, your question could evolve into two things:

either the code you have behaves as specified and the question may be posted on CR if you would like people to comment on how to improve it
ot it does not in which case there is a bug and you could post a question on SO explaining why it doesn't do what you expect, or, even better, you could include a MCVE showing the faulty behaviour.