Заготовка для MyTreeSet
This commit is contained in:
21
lab2/src/main/java/ru/spbstu/telematics/java/MyTreeSet.java
Normal file
21
lab2/src/main/java/ru/spbstu/telematics/java/MyTreeSet.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package ru.spbstu.telematics.java;
|
||||
|
||||
|
||||
public class MyTreeSet<E extends Comparable<E>> {
|
||||
// Класс для представления узла дерева
|
||||
private class Node {
|
||||
E value;
|
||||
Node left;
|
||||
Node right;
|
||||
|
||||
Node(E value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
private Node root;
|
||||
|
||||
public MyTreeSet() {
|
||||
root = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user