determine if two rectangles are overlap from leetcode updated