-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
executable file
·51 lines (43 loc) · 1.22 KB
/
Main.java
File metadata and controls
executable file
·51 lines (43 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
Name and Surname: Regan Koopmans
Student/staff Number: 15043143
*/
public class Main
{
public static void main(String [] args)
{
BStarTree testingTree = new BStarTree(6);
System.out.println("///////////////////////////////////////////////////////////////////");
System.out.println("\n \tTrivial Inserts \n");
for (int x = 0; x < 40; x++)
{
testingTree.insertElement(new Integer(x));
System.out.println();
testingTree.breadthFirst();
System.out.println();
}
System.out.println();
System.out.println("///////////////////////////////////////////////////////////////////");
System.out.println("\n \tSearches \n");
for (int x = 0; x < 45; x++)
{
System.out.println(x + " : " + testingTree.search(x));
}
// for (int x = 40; x < 41; x++)
// {
// System.out.println(x + " : " + testingTree.search(x));
// }
//
System.out.println();
System.out.println("///////////////////////////////////////////////////////////////////");
System.out.println("\n \tTrivial Deletes \n");
for (int x = 0; x < 40; x++)
{
System.out.println("Deleting " + x);
testingTree.deleteElement(new Integer(x));
System.out.println();
testingTree.breadthFirst();
System.out.println();
}
}
}