Coverage of different combinations of numbers

Say I have a set of numbers [1,2]

If i have a queue that holds atleast one number from the above set, can you suggest a way to cover all the following combinations of numbers?

1,
2,
1,2
2,1

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?)