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

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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting For Financial Instruments Questions!