blob: fdc3a247b21629509e42dce1cfc060b23fe6b796 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
namespace ALGA {
public class AVLTree {
public Node root;
public void insert(int number) {
if (root == null) {
root = new Node(number);
return;
}
root = root.insert(number);
}
public bool isBalanced() {
if (root == null) return true;
return root.isBalanced();
}
public void prettyprint() {
return;
}
}
}
|