Java
Java copied to clipboard
All Algorithms implemented in Java
This PR introduces a new GitHub Issue Template specifically for reporting bugs. - Matches the structure shown in issue #6763 - Adds clear sections for Summary, Environment, Steps, Expected vs....
### Description # Bug Report ## Summary ## Environment - **Operating System:** - **Go Version:** - **Terraform Version:** - **GitLab Provider Version:** - **GitLab Version:** (CE/EE and version number) ##...
This PR adds an implementation of the One-Time Pad (OTP) cipher using XOR. - Generates a random key using SecureRandom. - Encrypts and decrypts using XOR. - Validates matching key...
### What would you like to share? ## Description The CONTRIBUTING.md file currently references "TheAlgorithms room in GITTER" for community questions, but the repository has migrated to Discord for community...
- [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 PascalCase. -...
## Description This PR adds a Sudoku Solver implementation using the Backtracking algorithm as requested in issue #6929. ## Changes - **Added `SudokuSolver.java`** in `src/main/java/com/thealgorithms/backtracking/` - Implements backtracking algorithm to...
## Description This PR implements the LU decomposition algorithm for square matrices as requested in issue #6833. ## Changes - Implements LU decomposition using Doolittle's method - Decomposes square matrix...
### What would you like to Propose? **Title:** Add ElGamal Encryption and Decryption Algorithm Implementation --- ### 🧠 Overview I propose implementing the **ElGamal encryption scheme**, a public-key cryptosystem based...
### Summary Added a hard sliding window algorithm: Longest Substring with K Distinct Characters. ### Details - Implemented sliding window + hashmap solution (O(n) time). - Added JavaDoc and clean...
This PR optimizes the power() method by replacing the linear recursive implementation with an exponentiation-by-squaring approach. ✔ Time complexity reduced from O(n) → O(log n) ✔ Handles negative exponents ✔...