Easy and Concise Python Solution (97%)
I used two list to take note of the current state.\nIf you read question 218. The Skyline Problem, you will easily understand how I do this.\n\npos tracks the x
I used two list to take note of the current state.\nIf you read question **218. The Skyline Problem**, you will easily understand how I do this.\n\n```pos``` tracks the x-coordinate of start points.\n```height``` tracks the y-coordinate of lines.\n\n![0_1508239910449_skyline.png](/assets/uploads/files/1508239911437-skyline.png) \n\n````\ndef fallingSquares(self, positions):\n        height = [0]\n        pos = [0]\n        res = []\n        max_h = 0\n        for left, side in positions:\n            i = bisect.bisect_right(pos, left)\n            j = bisect.bisect_left(pos, left + side)\n            high = max(height[i - 1:j] or [0]) + side\n            pos[i:j] = [left, left + side]\n            height[i:j] = [high, height[j - 1]]\n            max_h = max(max_h, high)\n            res.append(max_h)\n        return res
[]