TreeSet Generic
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Implement a generic TreeSet.
Implement interface Treeable<T>.
Implement class MyTree<T> based on TreeSet data structure that implements interface Treeable<T>.
interface Treeable<T> { void insert(T value); // insert element to the tree T min(); // return minimum element from the tree T max(); // return maximum element from the tree boolean isPresent(T value); // check if value is present in the tree boolean Empty(); // check if tree is empty int size(); // return size of the tree } class MyTree<T> implements Treeable<T> { public TreeSet<T> s; ... }
Submissions 289
Acceptance rate 57%