message: update course-schedule.py
  Just use defaultdict
diff: # Time: O(|V| + |E|)
  # Space: O(|E|)
  -import collections
  +from collections import defaultdict, deque
  +
  class Solution(object):
  def canFinish(self, numCourses, prerequisites):
  @@ -10,13 +11,10 @@ class Solution(object):
  :type prerequisites: List[List[int]]
  :rtype: bool
  """
  - zero_in_degree_queue, in_degree, out_degree = collections.deque(), {}, {}
  + zero_in_degree_queue = deque()
  + in_degree, out_degree = defaultdict(set), defaultdict(set)
  for i, j in prerequisites:
  - if i not in in_degree:
  - in_degree[i] = set()
  - if j not in out_degree:
  - out_degree[j] = set()
  in_degree[i].add(j)
  out_degree[j].add(i)
  @@ -39,5 +37,3 @@ class Solution(object):
  return False
  return True
  -
  -
  