In reply to prav_b:
The brute force approach to this problem is creating a function that returns 0,1,2 or 3 depending on which combination it finds, and then covering that return value.
If you want a more general solution, you'll need to provide more details about the requirements. (i.e. will the set only hold 2 numbers? Will the queue only hold as many numbers as in the set?)