Java icon indicating copy to clipboard operation
Java copied to clipboard

Update EggDropping.java

Open manishraj27 opened this issue 1 year ago • 2 comments

Changes Made

  1. Improved Documentation

    • Added comprehensive class-level JavaDoc
    • Added detailed method documentation with @param and @return tags
    • Added time and space complexity analysis (O(nmm) time, O(n*m) space)
    • Added comments explaining DP state transitions and base cases
  2. Code Quality Improvements

    • Made class final and constructor private (utility class best practice)
    • Added try-catch block in main method for better error handling

The core dynamic programming algorithm remains unchanged, maintaining its educational value while improving code quality and documentation.

  • [x] I have read CONTRIBUTING.md.
  • [x] This pull request is all my own work -- I have not plagiarized it.
  • [x] All filenames are in PascalCase.
  • [x] All functions and variable names follow Java naming conventions.
  • [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • [x] All new code is formatted with clang-format -i --style=file path/to/your/file.java

manishraj27 avatar Oct 28 '24 08:10 manishraj27

Codecov Report

Attention: Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 72.96%. Comparing base (fd14016) to head (0ae0173).

Files with missing lines Patch % Lines
.../thealgorithms/dynamicprogramming/EggDropping.java 65.00% 6 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6047      +/-   ##
============================================
- Coverage     72.97%   72.96%   -0.01%     
+ Complexity     5029     5028       -1     
============================================
  Files           655      655              
  Lines         17588    17590       +2     
  Branches       3387     3386       -1     
============================================
+ Hits          12834    12835       +1     
- Misses         4262     4263       +1     
  Partials        492      492              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 28 '24 08:10 codecov-commenter

@siriak please review it!

manishraj27 avatar Oct 29 '24 06:10 manishraj27

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. Thank you for your contribution!

github-actions[bot] avatar Dec 03 '24 00:12 github-actions[bot]

Please reopen this pull request once you have made the required changes. If you need help, feel free to ask in our Discord server or ping one of the maintainers here. Thank you for your contribution!

github-actions[bot] avatar Dec 13 '24 00:12 github-actions[bot]