Welcome to the Java Algorithms Project! This repository contains a collection of algorithms implemented in Java, designed to help beginner programmers understand and practice fundamental programming concepts. Whether you're just starting out or looking to refine your skills, this project will serve as an invaluable resource.
Follow these simple steps to get started:
-
Clone this repository:
git clone https://github.com/dkk934/JAVA-Algorithm.git
-
Navigate to the project directory:
cd JAVA-Algorithm
-
Compile the Java files:
-
Ensure that you have the Java Development Kit (JDK) installed. You can download it from the official Oracle JDK page.
-
Compile all source files:
javac -d bin Graphs/*.java Sorting/*.java Trees/*.java CPMathAlgorithms/*.java MaximumFlow/*.java MinimumSpanningTree/*.java Searching/*.java ShortestPath/*.java UserInterface/*.java
-
This command compiles all Java files in the project and places the compiled classes in the
bin
directory.
-
Want to see the algorithms in action? Here's how:
-
Navigate to the
bin
directory:cd bin
-
Run a program:
-
To execute the User Interface, run:
java Main
-
You can also run individual algorithms by specifying the respective class name.
-
This project includes implementations of various algorithms categorized as follows:
Algorithms for traversing and searching graphs, crucial for modeling relationships in networks and connections.
Techniques to arrange data in a specific order (ascending/descending), with different sorting methods optimized for various use cases.
Operations on tree data structures like binary search trees, including insertion, deletion, and traversal algorithms.
Algorithms to find the optimal route between nodes in a graph with minimal cost, distance, or time.
Techniques for finding a subset of edges in a weighted graph that connects all vertices with the lowest total edge weight.
Methods to determine the greatest amount of flow possible from a source node to a sink node in a flow network.
We welcome contributions! To contribute:
-
Fork this repository.
-
Create a new branch:
git checkout -b feature/new-feature
-
Make changes and commit:
git commit -am 'Add new feature'
-
Push changes:
git push origin feature/new-feature
-
Submit a Pull Request for review.
Java-Algorithm-List
CPMathAlgorithms
- BinaryIndexedTree.java
- EuclideanAlgorithm.java
- FermatsLittleTheorem.java
- KMP.java
- ModularExponentiation.java
- ModularInverse.java
- SieveOfEratosthenes.java
Graphs
- BFS.java
- DFS.java
- DirectedGraphAdjList.java
- DirectedGraphAdjMatrix.java
- DirectedWeightedGraphAdjList.java
- DirectedWeightedGraphAdjMatrix.java
- UndirectedGraphAdjList.java
- UndirectedGraphAdjMatrix.java
- UndirectedGraphCycleDetection.java
MaximumFlow
- EdmondsKarpAlgorithm.java
- FordFulkersonAlgorithm.java
MinimumSpanningTree
- KruskalAlgorithm.java
- PrimAlgorithm.java
Searching
- BinarySearch.java
- ExponentialSearch.java
- JumpSearch.java
- LinearSearch.java
- TernarySearch.java
ShortestPath
- AStar.java
- BellmanFord.java
- DijkstraAlgorithm.java
- FloydWarshall.java
Sorting
- BinomialHeapSort.java
- BubbleSort.java
- CocktailShakerSort.java
- CountingSort.java
- FlashSort.java
- InsertionSort.java
- MergeSort.java
- PigeonholeSort.java
- QuickSort.java
- RadixSort.java
- SelectionSort.java
- ShellSort.java
- SleepSort.java
- StrandSort.java
- TimSort.java
- TopologicalSort.java
Trees
- AVLTree.java
- BinarySearchTree.java
- BinaryTree.java
- DecisionTree.java
- TreeInArray.java
- TreeLinkedList.java
This project is licensed under the MIT License. See the LICENSE file for more details.
🌟 Happy Coding! 🌟