I am dealing with the issue of an array in which I have to find unique elements. Now for this, my logic is to find the max element in the array and define a set of bits for this. But the problem in batet requires constant value, therefore, how to overcome this, below are some of my questions:
a) Can I accidentally set a variable-sized bitset?
b) If not, what is the best approach to use vector<bool> or vector<char> ?
c) I know that boost has a dynamic set of bits, but since I am doing this for training, I want to know alternative approaches.
c ++ data-structures bitset
Jacksparrow
source share