Question: Q6: If the list data structure did not maintain a data member mysize for the purpose of keeping track of the number of elements contained,

 Q6: If the list data structure did not maintain a data

Q6: If the list data structure did not maintain a data member mysize for the purpose of keeping track of the number of elements contained, how could the size of the list still be determined at a comparable cheap cost of O(1)? (a) Return the value of tail - head +1; (b) Iterates though the list nodes from head to tail and count (c) Keep track of the size of the list as values are entered (d) This is not possible. Q6: If the list data structure did not maintain a data member mysize for the purpose of keeping track of the number of elements contained, how could the size of the list still be determined at a comparable cheap cost of O(1)? (a) Return the value of tail - head +1; (b) Iterates though the list nodes from head to tail and count (c) Keep track of the size of the list as values are entered (d) This is not possible

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!