MCPcopy Create free account
hub / github.com/algorithm004-03/algorithm004-03 / Solution1

Class Solution1

Week 01/id_118/LeetCode_42_118.py:4–37  ·  view source on GitHub ↗

solution with 2 pointers the amount of water will always be the difference between the max height and current height, otherwise water will spill Time Complexity: O(n)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

LeetCode_42_118.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected