Question 5-24 points
For example: If L is the following 2D ArrayList of int
0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0
then foo(L) would return the following 2D array
1, 1, 1, 0, 1, 0
0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0
If L is the following 2D ArrayList of int
3, 4, 4, 4, 0, 6
4, 2, 1, 6, 3, 5
3, 6, 6, 6, 5, 8
4, 7, 4, 3, 2, 4
3, 7, 2, 0, 0, 0
then foo(L) would return the following 2D array
1, 1, 1, 3, 8, 4
5, 4, 7, 1, 1, 0
9, 3, 1, 4, 2, 1
9, 4, 3, 2, 1, 3
5, 5, 1, 3, 5, 7
1, 3, 6, 6, 6, 1
8, 1, 3, 5, 8, 1
3, 5, 8, 1, 4, 1
9, 4, 7, 9, 7, 2
1, 1, 0, 0, 0, 0