package com.anuragkapur.ctci.linkedlists;

import com.anuragkapur.ctci.linkedlists.Prob2_1_1_UnsortedLinkedList;
import com.anuragkapur.ds.linkedlist.SinglyLinkedList;
import com.anuragkapur.ds.linkedlist.SinglyLinkedListNode;
import org.junit.Assert;
import org.junit.Test;

public class Prob2_1_1_UnsortedLinkedListTest {

    @Test
    public void testRemoveDuplicates() throws Exception {
        SinglyLinkedListNode rootNode = SinglyLinkedList.getSinglyLinkedListWithDuplicates();
        SinglyLinkedListNode afterDuplicateRemoval = Prob2_1_1_UnsortedLinkedList.removeDuplicates(rootNode);
        StringBuilder stringBuilder = new StringBuilder();
        while (afterDuplicateRemoval != null) {
            stringBuilder.append(afterDuplicateRemoval.getPayload());
            afterDuplicateRemoval = afterDuplicateRemoval.getNext();
        }
        Assert.assertEquals("FOLW UP", stringBuilder.toString());
    }
}
@@ -40,78 +40,8 @@
 s;%0A%0A
-import com.anuragkapur.ctci.linkedlists.Prob2_1_1_UnsortedLinkedList;%0A
 impo

Remove unused import