Queue with unique entries in c++

Viewed 17429

I need to implement a queue containing unique entries(no duplicates) in C or C++. I am thinking of maintaining a reference of elements already available in queue but that seems very inefficient.

Kindly let me know your suggestions to tackle this.

4 Answers
Related