Python3 - beats 62.93% 296 ms - Using SortedList as BST and Defining an Ordering in Intervals
The approach is to maintain a sorted list of disjoint intervals, and their max height. \nTo do this I have defined an ordering in the intervals. Since brushing 
The approach is to maintain a sorted list of disjoint intervals, and their max height. \nTo do this I have defined an ordering in the intervals. Since brushing off square sides is not allowed,\nan interval it1 is less than it2 if it1.end <= it1.start.\n(the height is of no consequence when deciding order)\n\nWhenever we see a new square, we extract all the intervals it intersects with\n(intersection is checked by overloading the eq operator). The part of the original square which lies outside the new square is cut out and saved back in the sorted list. After all intersections are processes, we add the current interval with its max height.\n\nHope the explanation is clear, else please let me know in the comments.\n\nTime complexity - Every time we see a square it may potentially intersect with L squares of size 1. Processing these squares requires Log(n) time due to property of SortedList BST. \n\nSo time complexity is O(NL Log(N))\n\n```\nfrom sortedcontainers import SortedList\n\nclass It:\n    def __init__(self, start,end,h):\n        self.start = start\n        self.end = end\n        self.h = h\n        \n    def __lt__(self, obj):\n        return self.end <= obj.start\n    \n    def __gt__(self, obj):\n        return self.start >= obj.end\n\n    def __eq__(self, obj):\n        return not (self.__lt__(obj) or self.__gt__(obj))\n\nclass Solution:\n    def fallingSquares(self, positions: List[List[int]]) -> List[int]:\n        ans = []\n        mx = 0\n        \n        sl = SortedList()\n        \n        for p in positions:\n            \n            new_square = It(p[0],p[0]+p[1],p[1])\n            h = 0\n            while new_square in sl:\n                it = sl.pop(sl.index(new_square))\n                h = max(h,it.h)\n                if it.start < new_square.start:\n                    sl.add(It(it.start,new_square.start,it.h))\n                if it.end > new_square.end:\n                    sl.add(It(new_square.end,it.end,it.h))\n\t\t\t\t\t\n            new_square.h += h\n            sl.add(new_square)\n            mx = max(mx,new_square.h)\n            ans.append(mx)\n            \n        return ans\n\n```
[]