An \(n \times n\) array \(v\) is defined as follows:\(v\left[i,j\right] = i - j\) for all \(i, j, i \leq n, 1 \leq j \leq n\)The sum of the elements of the array \(v\) is
- A0
- Bn-1
- C\(n^2 - 3n +2\)
- D\(n^2 \frac{\left(n+1\right)}{2}\)
Solve it on GATE DA practice →More Basic Data Structures problems