message: Update my-calendar-iii.py
diff: -# Time: O(n^2)
  +# Time: O(nlogn) ~ O(n^2)
  # Space: O(n)
  import bisect
  @@ -6,6 +6,36 @@ import bisect
  class MyCalendarThree(object):
  + def __init__(self):
  + self.__books = [[-1, 0]]
  + self.__count = 0
  +
  + def book(self, start, end):
  + """
  + :type start: int
  + :type end: int
  + :rtype: int
  + """
  + i = bisect.bisect_right(self.__books, [start, float("inf")])
  + if self.__books[i-1][0] == start:
  + i -= 1
  + else:
  + self.__books.insert(i, [start, self.__books[i-1][1]])
  + j = bisect.bisect_right(self.__books, [end, float("inf")])
  + if self.__books[j-1][0] == end:
  + j -= 1
  + else:
  + self.__books.insert(j, [end, self.__books[j-1][1]])
  + for k in xrange(i, j):
  + self.__books[k][1] += 1
  + self.__count = max(self.__count, self.__books[k][1])
  + return self.__count
  +
  +
  +# Time: O(n^2)
  +# Space: O(n)
  +class MyCalendarThree2(object):
  +
  def __init__(self):
  self.__books = []
  @@ -34,5 +64,3 @@ class MyCalendarThree(object):
  result = max(result, cnt)
  return result
  -
  -
  