-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDemo.java
38 lines (28 loc) · 707 Bytes
/
Demo.java
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
/*
Copyright (C) Deepali Srivastava - All Rights Reserved
This code is part of DSA course available on CourseGalaxy.com
*/
package binaryTree;
public class Demo
{
public static void main(String[] args)
{
BinaryTree bt = new BinaryTree();
bt.createTree();
bt.display();
System.out.println();
System.out.println("Preorder : ");
bt.preorder();
System.out.println("");
System.out.println("Inorder : ");
bt.inorder();
System.out.println();
System.out.println("Postorder : ");
bt.postorder();
System.out.println();
System.out.println("Level order : ");
bt.levelOrder();
System.out.println();
System.out.println("Height of tree is " + bt.height());
}
}