Check Overlapping....|| Faster than 100% || Java || Modulo
\nclass Solution {\n    public final long MOD = (long)(Math.pow(10 , 9)+7);\n    public boolean isRectangleOverlap(int[] rec1, int[] rec2) {\n        long overl
```\nclass Solution {\n    public final long MOD = (long)(Math.pow(10 , 9)+7);\n    public boolean isRectangleOverlap(int[] rec1, int[] rec2) {\n        long overlap=0;\n        \n        long left = (long)Math.max(rec1[0] , rec2[0])%MOD;\n        long right = (long)Math.min(rec1[2] , rec2[2])%MOD;\n        long bottom = (long)Math.max(rec1[1] , rec2[1])%MOD;\n        long top = (long)Math.min(rec1[3] , rec2[3])%MOD;\n        \n        if(left<right && bottom<top){\n            \n            overlap = (((right-left)%MOD)*((top-bottom)%MOD))%MOD;\n        }\n        \n        return overlap>0;\n    }\n}\n```
['Math', 'Java']