Is there a data structure that lets me push and pop things onto/off of a queue, but also doesn't allow duplicates?
E.g.
I want
queue a;
a.push(1);
a.push(2);
a.push(2);
a.push(3);
to only have 3 elements, because 2 was added twice so the second time it is just ignored.
Any ideas?
Thanks,
Dave