Question: Question 5: We saw that singly linked lists use more memory than vectors to store the same data. How would you describe the memory usage

Question 5:

We saw that singly linked lists use more memory than vectors to store the same data.

How would you describe the memory usage of the two data structures using big-O notation (bearing in mind the simplification rules we saw in the lecture), where N is the number of items stored?

Question 5 options:

A.

Lists use O(N) memory, vectors use O(2N) memory

B.

Lists use O(1) memory, vectors use O(N) memory

C.

Lists and vectors both use O(N) memory

D.

Lists use O(N) memory, vectors use O(N^2) memory

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 Databases Questions!