1. (std::vector versus std::bitset ) An alternative to bitsets is to employ the class std::vector . There...

Question:

1. (std::vector versus std::bitset<>)

An alternative to bitsets is to employ the class std::vector. There has been much discussion about the shortcomings of this class (for example, it does not necessarily store its elements as a contiguous array).

Answer the following questions:

a) Determine which functionality it supports compared to the two bitset classes discussed here.

b) Create a function to compute the intersection of two instances std::vector.

Having completed the exercise will probably convince you that it is better to use bitset classes instead of std::vector.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: