Reputation: 11
I'm given a two-dimensional array of integers and I need to check if it contains a rectangle that has the same corners as the array corners. for example:
3 4 3 5 -9
0 4 4 -8 6
1 1 3 -9 6
4 3 -2 5 6
In this array we have a 2X3 rectangle that starts in [0,2]. (the corners are 3, -9, 4, 6)
How can I do that efficiently?
Upvotes: 1
Views: 357