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

Method getScore

javascript/2013-detect-squares.js:39–44  ·  view source on GitHub ↗
(x1, y1, x2, y2, { map } = this)

Source from the content-addressed store, hash-verified

37 }
38
39 getScore (x1, y1, x2, y2, { map } = this) {
40 const [ aKey, bKey ] = [ this.getKey(x1, y2), this.getKey(x2, y1) ];
41 const [ aScore, bScore ] = [ (map[aKey] || 0), (map[bKey] || 0) ];
42
43 return (aScore * bScore);
44 }
45};
46
47/**

Callers 1

countMethod · 0.95

Calls 1

getKeyMethod · 0.95

Tested by

no test coverage detected