Go to file
Bayram Turgut 6f521145cc
Update Average.java (#5309)
* Update Average.java

- Made the constructor throw an UnsupportedOperationException to prevent instantiation, making it explicit that this is a utility class.
- Added a private validateInput method to handle validation, reducing code duplication and improving readability.
- Consistent exception messages and handling for both methods.
- Improved comments to be more descriptive and follow JavaDoc conventions.
- Enhanced code readability and maintained consistent formatting.

* Minor Update Average.java

* Change To Average.java

* Mnr Average.java

* Update_Average.java

* Fix Average.java

1. throw new IllegalArgumentException("Numbers array cannot be empty or null");

2. int --> double

* fix2.java

return(double)..
2024-08-04 23:45:54 +05:30
.devcontainer chore: migrate to java 21 (#5163) 2024-05-19 21:57:07 +03:00
.github chore: migrate to java 21 (#5163) 2024-05-19 21:57:07 +03:00
src Update Average.java (#5309) 2024-08-04 23:45:54 +05:30
.clang-format chore: enforce InsertNewlineAtEOF in clang-format (#4343) 2023-09-01 04:10:46 +00:00
.gitignore Update .gitignore (#4344) 2023-09-01 09:37:29 +05:30
.gitpod.dockerfile Chore(deps): bump gitpod/workspace-java-21 from 2024-07-02-14-18-47 to 2024-07-14-17-19-51 (#5293) 2024-07-16 11:05:17 +02:00
.gitpod.yml Add SRTF Algorithm (#5011) 2024-01-08 23:48:11 +02:00
checkstyle.xml style: enable WhitespaceAround in checktyle (#5241) 2024-06-24 16:47:33 +08:00
CONTRIBUTING.md adding formatting steps in pull request template (#4606) 2023-10-08 21:06:13 +02:00
DIRECTORY.md feat: add PatienceSort (#5288) 2024-07-24 17:32:47 +02:00
LICENSE Update LICENSE 2021-02-25 16:15:52 -06:00
pmd-exclude.properties style: include BigIntegerInstantiation (#5294) 2024-07-16 11:39:11 +03:00
pom.xml Chore(deps): bump org.apache.commons:commons-lang3 from 3.14.0 to 3.15.0 (#5296) 2024-07-18 08:27:37 +02:00
README-ko.md Fix typo in README-ko.md (#4215) 2023-06-14 15:37:14 +03:00
README.md docs: add codecov badge (#5099) 2024-04-08 18:08:35 +00:00
spotbugs-exclude.xml style: include DLS_DEAD_LOCAL_STORE (#5276) 2024-07-05 22:52:54 +03:00

The Algorithms - Java

Build codecov Discord chat Gitpod ready-to-code

You can run and edit the algorithms, or contribute to them using Gitpod.io (a free online development environment) with a single click.

Open in Gitpod

All algorithms are implemented in Java (for educational purposes)

These implementations are intended for learning purposes. As such, they may be less efficient than the Java standard library.

Contribution Guidelines

Please read our Contribution Guidelines before you contribute to this project.

Algorithms

Our directory has the full list of applications.