Assume that mat has been declared as a 4 x 4 array of integers and has been initlalized to contain all 1s. Consider the following code segment.
int n = mat.length
for (int j = 1; j < n; j ++)
{
for (int k = 1; k < n; k++)
{
mat [ j ] [ k ] mat [ 1 ] [ k ] + mat [ j ] [ k - 1];
}
}
What is the value of mat [ 2 ] [ 2 ] after the code segment has completed execution?
a) 2
b) 3
c) 4
d) 6
e) 10