Merge pull request #360 from LeeChungWan/Trees

Modified Data Structures/Trees folder .java file name and class name
This commit is contained in:
Varun Upadhyay 2017-12-16 05:54:17 -08:00 committed by GitHub
commit d18033d051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
public class AVLtree {
public class AVLTree {
private Node root;
@ -200,7 +200,7 @@ public class AVLtree {
}
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++)

View File

@ -9,12 +9,12 @@ class Node
}
}
class BinaryTree
public class LevelOrderTraversal
{
// Root of the Binary Tree
Node root;
public BinaryTree()
public LevelOrderTraversal()
{
root = null;
}
@ -65,7 +65,7 @@ class BinaryTree
/* 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);

View File

@ -14,7 +14,7 @@ class Node {
}
/* Class to print Level Order Traversal */
class BinaryTree {
public class LevelOrderTraversalQueue {
Node root;
@ -49,7 +49,7 @@ class BinaryTree {
{
/* 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);

View File

@ -78,7 +78,7 @@ class Tree
}
// Driver class to test above methods
public class Main
public class PrintTopViewofTree
{
public static void main(String[] args)
{

View File

@ -10,7 +10,7 @@ class Node
}
}
public class BinaryTree
public class ValidBSTOrNot
{
//Root of the Binary Tree
Node root;
@ -47,7 +47,7 @@ public class BinaryTree
/* 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);