This Repository contains programs of Trees in Java, which contains programs of Kruskal, Prim & other algorithms as well as other methods for spanning tree & implementing methods of Binary Search Tree for better understanding the trees, method & working of tree in programs.
- Program 1: Program to find Minimal spanning tree of a graph using Kruskal’s algorithm.
- Program 2: Program to find Minimal spanning tree of a graph using Prim’s algorithm.
- Program 3: Program using functions for binary tree traversals Pre-order, In-order and Post-order using any Recursive and Non-recursive approach.
- Program 4: Implement following functions for Binary Search Trees
- Search a given item
- Insertion of a new node
- Maximum element of the BST
- Minimum element of the BST
- Successor of the BST
- Delete a given node from the BST
- Program 5: Implementation of AVL tree with operations (search, insert and delete).
- Kruskal's Algorithm: Minimal spannig tree of graph was made using Kruskal's algorithm.
- Prim's Algorithm: Minimal spannig tree of graph was made using Prim's algorithm.
- Binary Search Tree: A number of functions are made in binary tree traversing and tree itself.
- Recursion: Few of the methods are made with the logic of recursion.
- Time Complexity: By using the method of recursion, compilation is made in least possible run-time.
- Efficient: Recursion reduces runtime complexity as well as seperate functions are made to run program more efficiently.
To get started with this project, follow these steps:
- Clone the repository:
git clone https://github.com/Mubassim-Khan/Tree.git
-
Open the project in your preferred code editor.
-
Feel free to modify the code and customize it according to your preferences.
If you have any questions, suggestions, or feedback, you can reach out to the project maintainer:
- LinkedIn : Mubassim Ahmed Khan
- Email: mubassimkhan@gmail.com