Answer the following statements true (T) or false (F)
1. The copy constructor for our bag class requires traversing the original linked chain and duplicating each node visited.
2. A recursive version of toVector is complicated and requires invocation of the copy constructor.
3. Access time is a constant for an array-based implementation.
4. A link-based implementation requires less memory than an array-based implementation.
5. The following method is recursive.
template
void LinkedBag
Node
{
if (curPtr != nullptr)
{
bagContents.push_back(curPtr– >getItem());
fillVector(bagContents, curPtr– >getNext());
} // end if
} // end fillVector
1. True
2. False
3. True
4. False
5. True
You might also like to view...
The Split Table feature divides an existing table into two tables based on the:
A) location of the insertion point. B) selected cells. C) selected columns. D) selected rows.
? When you delete an email message that contains an attached file, you also delete the file that is attached to the message.
Answer the following statement true (T) or false (F)