Write an algorithm to remove duplicated node from a linked list.
There are many ways to do it. For the first one, as the simplest one, we could use 2 loops to compare each element with all other elements. However, this takes forever: O(n²).
The second way