<prompt> Kujenga algorithm kuondoa duplicates kutoka orodha single kushikamana.  <response>: Here is an algorithm to remove duplicates from a singly linked list. Note: This solution assumes that the singly linked list contains comparable and hashable values.1. Create a new, empty hash set. This will be used to keep track of the values we have already encountered in the linked list.2. Set current to the head of the linked list and prev to None.3. Start a while loop that will continue until current is None: a. If the value of current is in the hash set, then it is a duplicate. Set the next attribute of prev to current.next, effectively skipping over current and removing it from the linked list. b. If the value of current is not in the hash set, add it to the set, and set prev to current. c. In either case, move current forward by setting it to current.next.4. The duplicates have now been removed from the singly linked list.Here is the same algorithm expressed in Python-like pseudocode:def remove_duplicateshead: values set current head prev None while current is not None: if current.val in values: prev.next current.next else: values.addcurrent.val prev current current current.next 