Question: We have a contains() function in LazyList for concurrent data structures which checks whether a particular item is contained in the linked list and returns

We have a contains() function in LazyList for concurrent data structures which checks whether a particular item is contained in the linked list and returns false if tge matching node is marked as deleted. The code for the same is given below:

bool LazyList:: contains (T * item) {

Node * curr = head;

while (curr -> key < item ->key)

curr = curr ->next;

return current->key == item-> key && !curr->marked

Write a contains() function for Concurrent Lists with Fine Grained synchronization.

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!