# 0836. Rectangle Overlap ###### tags: `Leetcode` `Microsoft` `Easy` Link: https://leetcode.com/problems/rectangle-overlap/ ## 思路 grear idea from [here](https://leetcode.com/problems/rectangle-overlap/discuss/132340/C%2B%2BJavaPython-1-line-Solution-1D-to-2D) ## Code ```java= class Solution { public boolean isRectangleOverlap(int[] rec1, int[] rec2) { return rec1[0] < rec2[2] && rec2[0] < rec1[2] && rec1[1] < rec2[3] && rec2[1] < rec1[3]; } } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up