Java
Java copied to clipboard
All Algorithms implemented in Java
### What would you like to Propose? I propose adding a clean and optimized implementation of Kruskal’s Minimum Spanning Tree (MST) algorithm using Union–Find (Disjoint Set Union - DSU) data...
- [ x ] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Java/blob/master/CONTRIBUTING.md). - [ x ] This pull request is all my own work -- I have not plagiarized it. - [ x ]...
## Summary This Pull Request adds a clean and efficient implementation of Dijkstra’s Algorithm using a PriorityQueue, as requested in issue #7112. ## What This PR Includes - New file...
### What would you like to share? Implement Dijkstra's algorithm for finding shortest paths from a source vertex to all other vertices in a weighted graph. Key Features: Use PriorityQueue...
This is a documentation-only PR to improve contributor onboarding for TheAlgorithms/Java: - Adds `.github/ISSUE_TEMPLATE/good-first-issue.md` to help new contributors find tasks. - Adds `.github/PULL_REQUEST_TEMPLATE.md` to standardize PRs. - Appends a Local...
## Description This PR adds an implementation of **Kruskal's Algorithm** for finding the Minimum Spanning Tree (MST) in weighted undirected graphs. This addresses the feature request in issue #7067. Kruskal's...
Fixes #7105 - [x] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Java/blob/master/CONTRIBUTING.md). - [x] This pull request is all my own work -- I have not plagiarized it. - [x] All filenames are in...
## Description This PR implements Topological Sorting using Depth-First Search (DFS) for Directed Acyclic Graphs (DAGs) as requested in issue #6938. ## Changes Made - ✅ Implemented `TopologicalSortDFS.java` with DFS-based...
This PR introduces a new GitHub Issue Template specifically for reporting bugs. - Matches the structure shown in issue #6763 -Sections for Summary, Environment, Steps, Expected vs Actual behavior -Areas...
## Description This pull request adds the **Search a 2D Matrix** algorithm to the directory `src/main/java/com/thealgorithms/matrix/`. This algorithm solves the well-known problem where each row of the matrix is sorted,...