Solving Rectangle Overlap in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Two rectangles overlap if the area of their intersection is positive. To be clear, two rectangles that only touch at the corner or edges do not overlap.

Example 1:

Input: rec1 = [0,0,2,2], rec2 = [1,1,3,3]
Output: true

Example 2:

Input: rec1 = [0,0,1,1], rec2 = [1,0,2,1]
Output: false


See the full details of the problem Rectangle Overlap at LeetCode

Originally posted at: