(point, { map, points } = this)
| 9 | } |
| 10 | |
| 11 | add (point, { map, points } = this) { |
| 12 | const [ x, y ] = point; |
| 13 | const key = this.getKey(x, y); |
| 14 | const value = ((map[key] || 0) + 1); |
| 15 | |
| 16 | map[key] = value; /* Space O(N) */ |
| 17 | points.push(point);/* Space O(N) */ |
| 18 | } |
| 19 | |
| 20 | count (point, { points } = this, score = 0) { |
| 21 | const [ x1, y1 ] = point; |