Skip to content

Commit

Permalink
Modified Data Structures/Trees folder .java file name and class name
Browse files Browse the repository at this point in the history
  • Loading branch information
wannee2 committed Dec 16, 2017
1 parent dcf7f8f commit 6dcce9f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Data Structures/Trees/AVLTree.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public class AVLtree {
public class AVLTree {

private Node root;

Expand Down Expand Up @@ -200,7 +200,7 @@ private void reheight(Node node){
}

public static void main(String[] args) {
AVLtree tree = new AVLtree();
AVLTree tree = new AVLTree();

System.out.println("Inserting values 1 to 10");
for (int i = 1; i < 10; i++)
Expand Down
6 changes: 3 additions & 3 deletions Data Structures/Trees/LevelOrderTraversal.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ public Node(int item)
}
}

class BinaryTree
public class LevelOrderTraversal
{
// Root of the Binary Tree
Node root;

public BinaryTree()
public LevelOrderTraversal()
{
root = null;
}
Expand Down Expand Up @@ -65,7 +65,7 @@ else if (level > 1)
/* Driver program to test above functions */
public static void main(String args[])
{
BinaryTree tree = new BinaryTree();
LevelOrderTraversal tree = new LevelOrderTraversal();
tree.root= new Node(1);
tree.root.left= new Node(2);
tree.root.right= new Node(3);
Expand Down
4 changes: 2 additions & 2 deletions Data Structures/Trees/LevelOrderTraversalQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public Node(int item) {
}

/* Class to print Level Order Traversal */
class BinaryTree {
public class LevelOrderTraversalQueue {

Node root;

Expand Down Expand Up @@ -49,7 +49,7 @@ public static void main(String args[])
{
/* creating a binary tree and entering
the nodes */
BinaryTree tree_level = new BinaryTree();
LevelOrderTraversalQueue tree_level = new LevelOrderTraversalQueue();
tree_level.root = new Node(1);
tree_level.root.left = new Node(2);
tree_level.root.right = new Node(3);
Expand Down
2 changes: 1 addition & 1 deletion Data Structures/Trees/PrintTopViewofTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void printTopView()
}

// Driver class to test above methods
public class Main
public class PrintTopViewofTree
{
public static void main(String[] args)
{
Expand Down
4 changes: 2 additions & 2 deletions Data Structures/Trees/ValidBSTOrNot.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public Node(int item)
}
}

public class BinaryTree
public class ValidBSTOrNot
{
//Root of the Binary Tree
Node root;
Expand Down Expand Up @@ -47,7 +47,7 @@ boolean isBSTUtil(Node node, int min, int max)
/* Driver program to test above functions */
public static void main(String args[])
{
BinaryTree tree = new BinaryTree();
ValidBSTOrNot tree = new ValidBSTOrNot();
tree.root = new Node(4);
tree.root.left = new Node(2);
tree.root.right = new Node(5);
Expand Down

0 comments on commit 6dcce9f

Please sign in to comment.