尝试实现SET接口并为union方法使用Iterator。在union方法中,它从不进入while循环。它不添加联合方法所具有的参数"set“中的元素。有什么想法吗?)包装linkedSet;进口linkedList.LinearNode;private int size;
private LinearNode<
我已经能够使用二进制搜索树实现T first()方法,但不能使用HashSet。first() // least value in the set (if the set is empty // throws NoSuchElementException) import java.lang.Iterable;
class HashSet<T extends Comparable<T>> implements Itera