Mark Start/End Points
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
```csharp []
public class Solution {
    public int[][] RangeAddQueries(int n, int[][] queries) {
        int[][] res = new int[n][];
        for(int i = 0; i < n; i++)
        {
            res[i] = new int[n];
        }

        foreach(int[] q in queries)
        {
            int r1 = q[0], c1 = q[1], r2 = q[2], c2 = q[3];
            res[r1][c1]++;
            if(r2+1 < n)
                res[r2+1][c1]--;

            if(c2+1 < n)
                res[r1][c2+1]--;

            if(r2 < n-1 && c2 < n-1)
                res[r2+1][c2+1]++;
        }

        for(int i = 0; i < n; i++)
        {

            for(int j = 1; j < n; j++)
            {
                res[i][j] += res[i][j-1];
            }
        }

        for(int i = 1; i < n; i++)
        {
            for(int j = 0; j < n; j++)
            {
                res[i][j] += res[i-1][j];
            }
        }

        return res;
    }
}
```
['C#']