JAVA || BEGINNERS FRIENDLY ||🔥🔥
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public int[][] rangeAddQueries(int n, int[][] queries) {
        int mat[][]=new int[n][n];
        for(int i=0;i<queries.length;i++){
            for(int j=queries[i][0];j<=queries[i][2];j++){
                mat[j][queries[i][1]]++;   //str of arr for inc +1
                if(queries[i][3]+1<n){
                 mat[j][queries[i][3]+1]--;   //upto which arr inc after that de
                }
            }
        }
         for(int i=0;i<n;i++){
                for(int j=1;j<n;j++){
                    mat[i][j]=mat[i][j-1]+mat[i][j];
                }
            }
      //  System.out.print(mat);
    return mat;

    }
}
```
['Java']