Simple One line Java Code just Math || Beats 100%
Complexity\n- Time complexity:\nO(1)\n- Space complexity:\nO(1)\n# Code\n\nclass Solution {\n    public boolean isRectangleOverlap(int[] rec1, int[] rec2) {\n  
# Complexity\n- Time complexity:\nO(1)\n- Space complexity:\nO(1)\n# Code\n```\nclass Solution {\n    public boolean isRectangleOverlap(int[] rec1, int[] rec2) {\n        return rec1[0] < rec2[2] && rec1[1] < rec2[3] && rec2[0] < rec1[2] && rec2[1] < rec1[3];\n    }\n}\n```\n\n![upvote.jpeg](https://assets.leetcode.com/users/images/3c2f63fd-a334-4a3b-871b-3c23565fdfbb_1705767696.7000425.jpeg)\n
['Math', 'Java']