iluwatar / 30-seconds-of-java

Collection of reusable tested Java 17 compatible code snippets that you can understand in 30 seconds or less.
https://java-design-patterns.com/snippets.html
MIT License
1.04k stars 409 forks source link

Implement improvements in the modeArray method #208

Closed GerardluqueDev closed 3 months ago

GerardluqueDev commented 6 months ago

This commit implements significant improvements in the modeArray method to enhance its efficiency and handle cases of multiple modes or the absence of number repetition. I have optimized the calculation of the frequency of each element, updated the algorithm to find the maximum frequency value, and added handling to correctly build the array of modes. Additionally, I have added comments to document the changes made in the code and improve its readability

sonarcloud[bot] commented 6 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

stale[bot] commented 5 months ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 3 months ago

Closed due to inactivity. Thank you for your contributions.