Brute Force Approach(no TLE in Java)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\nSince we are runnig 3 nested loops, hence, TC will be O(cubic N)\n\n- Space complexity:\nO(N*N) : For array we are using to store our ans...\n\n# Code\n```\nclass Solution {\n    public int[][] rangeAddQueries(int n, int[][] queries) {\n        int[][] mat = new int[n][n];\n   for (int[] q : queries) {\n       int row1 = q[0], col1 = q[1], row2 = q[2], col2 = q[3];\n       for (int i = row1; i <= row2; i++) {\n           for (int j = col1; j <= col2; j++) {\n               mat[i][j]++;\n           }\n       }\n   }\n   return mat;\n    }\n}\n```
['Java']