Skip to content

Implement Trapped Rain Water problem using Dynamic Programming #5102

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 4 commits into from
Closed

Implement Trapped Rain Water problem using Dynamic Programming #5102

wants to merge 4 commits into from

Conversation

sozelfist
Copy link
Contributor

  • 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

@codecov-commenter
Copy link

codecov-commenter commented Apr 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.21%. Comparing base (295ac4b) to head (21a5191).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5102      +/-   ##
============================================
+ Coverage     37.12%   37.21%   +0.08%     
- Complexity     2330     2338       +8     
============================================
  Files           517      518       +1     
  Lines         15645    15662      +17     
  Branches       2984     2988       +4     
============================================
+ Hits           5808     5828      +20     
+ Misses         9548     9547       -1     
+ Partials        289      287       -2     

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

@vil02
Copy link
Member

vil02 commented Apr 8, 2024

Since:

NOTE: *We DO NOT add leetcode problems. They are just applications of basic principles that can be found in other algorithms included in the repository.*

and the fact that it is a leet code problem, I have to close it.

@vil02 vil02 closed this Apr 8, 2024
@sozelfist
Copy link
Contributor Author

sozelfist commented Apr 9, 2024

Since:

NOTE: *We DO NOT add leetcode problems. They are just applications of basic principles that can be found in other algorithms included in the repository.*

and the fact that it is a leet code problem, I have to close it.

"Trapped rainwater" is a classic problem in computer science and algorithm design. It's often used as an example in dynamic programming, as well as in various coding challenges, including those found on platforms like LeetCode.

The problem involves calculating how much rainwater can be trapped in between blocks or walls of different heights. Solving this problem efficiently requires clever algorithmic thinking, and dynamic programming is one approach that can be used to solve it optimally.

So, while it's commonly encountered as a problem on coding platforms like LeetCode, you can see that it's not just a LeetCode problem; it's a broader algorithmic problem used to teach and practice dynamic programming techniques like other problem such as coinchange, knapsack and so on.

Would you mind re-opening this PR again @vil02.

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