Challenge: Remove Duplicates from Linked List - Hashing
In this lesson, you must figure out the Pythonic solution for removing duplicates from a linked list.
We'll cover the following
Problem Statement
You will now be implementing the remove_duplicates()
function. When a linked list is passed to this function, it removes any node which is a duplicate of another existing node.
You have already seen this in Challenge: Remove Duplicates from Linked List. Here you would use HashTables for a more efficient solution.
You can see an example below:
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.