Commit Graph

8 Commits

Author SHA1 Message Date
Piotr Idzik
a9633c0000 style: include ICAST_IDIV_CAST_TO_DOUBLE (#6121) 2025-01-10 20:50:09 +02:00
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
Piotr Idzik
d3bb691f59 style: enable HideUtilityClassConstructor in checkstyle (#5147) 2024-05-08 09:58:29 +03:00
Abhinav Pandey
152e29034d Improved code readability and code quality (#4663)
* Fixed Small typos :-)

* Update BufferedReader.java

* Made the following changes :

* Improved readability of files and removed gramatical errors.

* Implemented data assigning instead of manually calling arr.ylength in several instances like FindMax, FindMaxRecursion etc.

* Removed unwanted params from several files

* Implemented Math methods in files math/FindMinRecursion.java and FindMaxRecursion.java

* Update src/main/java/com/thealgorithms/maths/FindMinRecursion.java

---------

Co-authored-by: Debasish Biswas <debasishbsws.dev@gmail.com>
2023-10-11 17:29:55 +05:30
Anirudh Pathak
de2696d0c5 Add Null/Empty check for param in average method (#4185) 2023-05-10 19:30:41 +03:00
Philippe CANCELLIER
6235fd6505 Add tests for Average (#3652) 2022-10-25 15:00:53 +03:00
acbin
e96f567bfc Format code with prettier (#3375) 2022-10-03 17:23:00 +08:00
Aitor Fidalgo Sánchez
9fb3364ccc Change project structure to a Maven Java project + Refactor (#2816) 2021-11-12 08:59:36 +02:00