用一个队列实现数学上的集合(Set)的元素判定(属于、is a member of)、子集判定(包含于、is a subset of、is contained in)、交(intersection)、并(union)、差(complement、set-theoretic difference)运算,集合元素限定为整数。只能利用队列的入队和出队操作访问队列中元素。
参考一下:https://blog.csdn.net/men_wen/article/details/62037381
如果对你有帮助,可以点击我这个回答右上方的【采纳】按钮,给我个采纳吗,谢谢