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
Implement Trapped Rain Water Problem #712
Implement Trapped Rain Water Problem #712
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #712 +/- ##
=======================================
Coverage 94.78% 94.78%
=======================================
Files 299 300 +1
Lines 22245 22274 +29
=======================================
+ Hits 21084 21113 +29
Misses 1161 1161 ☔ View full report in Codecov by Sentry. |
- Create iterator in a single function - Add tests - Rewrite docstring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good. Since the suggested changes are small, I will push them, to speed up the whole process.
* chore: add `trapped_rainwater.rs` to DIRECTORY.md * feat: implement Trapped Rain Water algorithm * chore: add tests * chore: rename `height` to `elevation_map` * ref: change `Vec<u32` to `[u32]` * ref: refactor implementation - Create iterator in a single function - Add tests - Rewrite docstring * tests: add more test cases * style: simplify logic by removing redundant branch --------- Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
Type of change
Checklist:
cargo clippy --all -- -D warnings
just before my last commit and fixed any issue that was found.cargo fmt
just before my last commit.cargo test
just before my last commit and all tests passed.mod.rs
file within its own folder, and in any parent folder(s).DIRECTORY.md
with the correct link.COUNTRIBUTING.md
and my code follows its guidelines.