# Errors in Test Data

• In the statement, it says
"Each rectangle is defined by its bottom left corner and top right corner"

However, there are test cases like

Input: -2, -2, 2, 2, -3, 3, -4, 4

Which is wrong, because there are no rectangles with bottom left corner (-3, 3) and top right corner (-4, 4).

• Agree with you so much and another case '0, 0, 0, 0, -1, -1, 1, 1', I think, is wrong,too, because the first is just the original point, not a valid rectangle.

• can't agree more

• I think this is okay.

• This is fixed, sorry for the inconvenience.

• A rectangle of area 0

• While I at first didn't see a problem with such a "point rectangle", partly because I saw our rectangles as the Cartesian product of two intervals in ℝ, I do after some digging agree that it's bad. "Rectangle" literally means "right angle". And I don't see any angles in a single point. Definitions I've seen also mention the angles (and sides) right away:

Mathworld's first sentence:

A closed planar quadrilateral with opposite sides of equal lengths a and b, and with four right angles.

Wikipedia's first sentence:

In Euclidean plane geometry, a rectangle is any quadrilateral with four right angles.

• This post is deleted!

• Well, for most problems which have string input, the interviewer looks for edge cases were the string is null or empty. Technically, you are asked to do something on a string with characters that is provided to you, and you still have to take those nulls and empty cases into consideration.

For this problem, assume one of the rectangles are missing (the only way to represent this is make left bottom corner and right top corner coincide to become a point, considering the input parameters). Yes, this is the 'BAD' test case!

• I know you clearly. Thanks very much.

• This post is deleted!

• Hey, I'm also まどか☆マギカ fan, nice to meet you.

• This post is deleted!

• This post is deleted!

• @mbyd916 said in Errors in Test Data:

Agree with you so much and another case '0, 0, 0, 0, -1, -1, 1, 1', I think, is wrong,too, because the first is just the original point, not a valid rectangle.

Agreed, a nasty case to get around to get accepted.

• This post is deleted!

• @mbyd916 said in Errors in Test Data:

Agree with you so much and another case '0, 0, 0, 0, -1, -1, 1, 1', I think, is wrong,too, because the first is just the original point, not a valid rectangle.

This test case is still out there. Ridiculous.
The focus is not the original point can or cannot be treated as a rectangle.
The overlapped area of a point and another rectangle should be 0. Not 4 as "expected".

• 0, 0, 0, 0, -1, -1, 1, 1
what an amazing case!

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.