Course Solutions Uncategorized (Solved) : Contains Function Lazylist Concurrent Data Structures Checks Whether Particular Item Conta Q32519526 . . . .

(Solved) : Contains Function Lazylist Concurrent Data Structures Checks Whether Particular Item Conta Q32519526 . . . .

 

We have a contains() function in LazyList for concurrent datastructures which checks whether a particular item is contained inthe linked list and returns false if the matching node is marked asdeleted. 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 FineGrained synchronization.

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post