WC 4.1 - Intersecting Area Of Overlapping Rectangles

You need to find the overlapping area of the two given rectangles. The section you need to output the area of would be the blue lined section shown in the image.
The sides are parallel to the coordinate axes.
If the two rectangles do not overlap, the resultant area should be 0.
Overlapping Rectangles

There will be two lines of input. On each line are the x and y positions (separated by a comma) of each opposing corner (each corner co-ordinate separated by a space).
The co-ordinates can have decimals, and can be negative.

The area of the overlapping section of the two rectangles, including any decimal part.

Sample Input
0,0 2,2
1,1 3,3

Sample Output

Problem Statement
Find the Overlapping Area of two rectangles with the given co ordinates
-3.5, 4  1, 1
 1, 3.5  -2.5, -1

This challenge is worth 60 points.

You must be logged in to submit a solution

View ranklist for this challenge
About scoring and submission

Contact Us

Krish Shah : 9323115454

Kaustubh Khavnekar : 9769408039

Privacy Policy