2015-6: Hey! This is My Space

Write code that takes, as each of its first and second arguments, a pair of co-ordinates representing diagonally opposite corners of two rectangles and returns a 1 if the rectangles overlap.

The co-ordinates could be either (upper-left, lower-right) or (upper-right, lower left).

Examples

Implementation

You can also run the tests via ⌘/shift + enter