C# Solution
\npublic class Solution \n{\n    public IList<int> FallingSquares(int[][] positions) \n    {\n        var result = new List<int>();\n        var intervals = new
```\npublic class Solution \n{\n    public IList<int> FallingSquares(int[][] positions) \n    {\n        var result = new List<int>();\n        var intervals = new List<Interval>();\n        int max = 0;\n        foreach(var p in positions)\n        {\n            var interval = new Interval(p[0], p[0] + p[1] - 1, p[1]);\n            max = Math.Max(max, InsertInterval(intervals, interval));\n            result.Add(max);\n        }\n        \n        return result;\n    }\n    \n    private int InsertInterval(List<Interval> intervals, Interval interval)\n    {\n        int maxOverlappingHeight = 0;\n        foreach(var i in intervals) {\n            if (i.End < interval.Start) continue;\n            if (i.Start > interval.End) continue;\n            maxOverlappingHeight = Math.Max(maxOverlappingHeight, i.Height);\n        }\n        \n        interval.Height += maxOverlappingHeight;\n        intervals.Add(interval);\n        return interval.Height;\n    }\n}\n\npublic class Interval\n{\n    public int Start;\n    public int End;\n    public int Height;\n    public Interval(int s, int e, int h)\n    {\n        Start = s;\n        End = e;\n        Height = h;\n    }\n}\n```
[]