Quick and easy Ruby solution
Complexity\n- Time complexity:\n Add your time complexity here, e.g. O(n) \nO(1)\n\n- Space complexity:\n Add your space complexity here, e.g. O(n) \nO(1)\n\n# 
# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(1)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n\n# Code\n```\n# @param {Integer[]} rec1\n# @param {Integer[]} rec2\n# @return {Boolean}\ndef is_rectangle_overlap(rec1, rec2)\n    # x1 == x2 || y1 == y2 -> false\n    # check if its a line. This can be skipped but is here for understanding purpose.\n    return false if rec1[0] == rec1[2] || rec1[1] == rec1[3] || rec2[0] == rec2[2] || rec2[1] == rec2[3]\n\n    # 1    2   1    2\n    # x2 > x1; y2 > y1\n    # x1 < x2; y1 < y2\n\n    (rec1[2] > rec2[0] && rec1[3] > rec2[1] &&\n    rec1[0] < rec2[2] && rec1[1] < rec2[3])\nend\n```
['Ruby']