To add an element to a Vector, we must allocate new memory and copy over the existing elements. That’s not quick! Here’s a storage scheme that’s faster to update.
22. Linked Lists
Get C++20 for Lazy Programmers: Quick, Easy, and Fun C++ for Beginners now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.