mike aol
mike aol

Reputation: 11

How to find a rectangle in a two-dimensional array with the same corners?

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

Answers (0)

Related Questions