Skip to content

Conversation

@SURYANSHUAGRAWAL2006
Copy link

Description

Implemented Trapping Rain Water algorithm in Java.

  • Used O(n) time and O(1) space approach.
  • Solved using for-loops and if-else statements without extra arrays.
  • File and class follow PascalCase: TrappingRainWater.java / TrappingRainWater.
  • Package: com.thealgorithms.dynamicprogramming
  • No Scanner or System.out.print statements, fully compatible with automated tests.
  • Problem reference: https://leetcode.com/problems/trapping-rain-water/
  • 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 Oct 24, 2025

Codecov Report

❌ Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.96%. Comparing base (48ba1ae) to head (0085e6c).

Files with missing lines Patch % Lines
...gorithms/dynamicprogramming/TrappingRainWater.java 0.00% 29 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6920      +/-   ##
============================================
- Coverage     78.05%   77.96%   -0.10%     
- Complexity     6466     6467       +1     
============================================
  Files           738      739       +1     
  Lines         21585    21614      +29     
  Branches       4220     4231      +11     
============================================
+ Hits          16849    16851       +2     
- Misses         4064     4092      +28     
+ Partials        672      671       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SURYANSHUAGRAWAL2006
Copy link
Author

"if there's any change or format issue, please let me know. I'll fix it quickly".

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