Skip to content

Create DungeonGame.java #6005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

Tsurya06
Copy link

@Tsurya06 Tsurya06 commented Oct 25, 2024

The DungeonGame class implements a solution to the Dungeon Game problem using dynamic programming. The goal is to determine the minimum initial health points needed for a knight to survive a dungeon represented by a 2D grid, where each cell contains a health value that can be positive or negative. The knight moves from the top-left corner to the bottom-right corner, and the solution calculates the minimum health required to ensure the knight's health never drops to zero or below at any point.

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

The DungeonGame class implements a solution to the Dungeon Game problem using dynamic programming. The goal is to determine the minimum initial health points needed for a knight to survive a dungeon represented by a 2D grid, where each cell contains a health value that can be positive or negative. The knight moves from the top-left corner to the bottom-right corner, and the solution calculates the minimum health required to ensure the knight's health never drops to zero or below at any point.
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.

Project coverage is 68.75%. Comparing base (3b2ba48) to head (6b0ffd9).

Files with missing lines Patch % Lines
.../thealgorithms/dynamicprogramming/DungeonGame.java 0.00% 17 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6005      +/-   ##
============================================
- Coverage     68.80%   68.75%   -0.05%     
- Complexity     4643     4644       +1     
============================================
  Files           622      623       +1     
  Lines         17146    17163      +17     
  Branches       3308     3312       +4     
============================================
+ Hits          11797    11801       +4     
- Misses         4895     4910      +15     
+ Partials        454      452       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@siriak
Copy link
Member

siriak commented Oct 25, 2024

We don't add leetcode problems

@siriak siriak closed this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants