message: Update count-positions-on-street-with-required-brightness.py
diff: # Time: O(n + l)
  -# Space: O(n)
  +# Space: O(min(n, l))
  +
  +import collections
  +
  # line sweep
  class Solution(object):
  @@ -10,13 +13,13 @@ class Solution(object):
  :type requirement: List[int]
  :rtype: int
  """
  - cnt = [0]*(n+1)
  + cnt = collections.defaultdict(int)
  for p, r in lights:
  cnt[max(p-r, 0)] += 1
  cnt[min(p+r, n-1)+1] -= 1
  result = curr = 0
  for i, r in enumerate(requirement):
  - curr += cnt[i]
  + curr += cnt.get(i, 0)
  if curr >= r:
  result += 1
  return result
  