[Java] Simple brute force solution,  beats 71.5%T and 100%S
Runtime: 19 ms, faster than 71.50% of Java online submissions for Falling Squares.\nMemory Usage: 39.2 MB, less than 100.00% of Java online submissions for Fall
Runtime: 19 ms, faster than 71.50% of Java online submissions for Falling Squares.\nMemory Usage: 39.2 MB, less than 100.00% of Java online submissions for Falling Squares.\n```\nclass Solution {\n    public List<Integer> fallingSquares(int[][] positions) {\n        int n = positions.length;\n        int[] height = new int[n];\n        int maxHeight = 0;\n        ArrayList<Integer> res = new ArrayList<Integer>();\n        for(int i = 0; i < n; i++){\n            int left = positions[i][0];\n            int right = positions[i][0] + positions[i][1];\n            int h = 0;\n            for(int j = 0; j < i; j++){\n                int l = positions[j][0];\n                int r = positions[j][0] + positions[j][1];\n                if( !(right <= l || left >= r))\n                    h = Math.max(height[j],h);\n            }\n            height[i] = h + positions[i][1];\n            maxHeight = Math.max(height[i],maxHeight);\n            res.add(maxHeight);\n        }        \n        return res;     \n    }\n}\n```
[]