MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / getHeights

Function getHeights

javascript/0042-trapping-rain-water.js:84–84  ·  view source on GitHub ↗
(height, left, right)

Source from the content-addressed store, hash-verified

82const hasNewMax = (max, height) => max < height;
83
84const getHeights = (height, left, right) => [height[left], height[right]];
85
86const getWindows = (height, left, maxLeft, right, maxRight) => {
87 const [leftHeight, rightHeight] = getHeights(height, left, right);

Callers 2

trapFunction · 0.85
getWindowsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected