implement the following four methods:
public void union(LinkedLis t ll, boolean addFront);
Return a new LinkedList whose members consist of elements that are members of this LinkedList, ll, or both. If addFront is true, unite the ll from the beginning of this LinkedList, otherwise from the end.
public LinkedList difference(Link edList ll);
Return a new LinkedList whose members consist of elements that are members in this LinkedList, but not in ll.
public boolean subset(LinkedLi st ll);
Return true if and only if ll is a subset of this LinkedList, return false otherwise.
public BST toBST();
Return a BST object from this LinkedList.
public void union(LinkedLis t ll, boolean addFront);
Return a new LinkedList whose members consist of elements that are members of this LinkedList, ll, or both. If addFront is true, unite the ll from the beginning of this LinkedList, otherwise from the end.
public LinkedList difference(Link edList ll);
Return a new LinkedList whose members consist of elements that are members in this LinkedList, but not in ll.
public boolean subset(LinkedLi st ll);
Return true if and only if ll is a subset of this LinkedList, return false otherwise.
public BST toBST();
Return a BST object from this LinkedList.
Comment