Given a 2d array
and

4 variables that creates another 2d array.
(top, left) and (bottom,right)

(Those are the coordinates to form another 2d array.)
These variables can partially cover the given 2d array. So, negative and values greater than the width and height of the given 2d array is involved.



I have to figure out the overlapping 2d array created by these two 2d arrays and display it.
Can you give my some hints?