leetcode836

public class Solution
    {
        public bool IsRectangleOverlap(int[] rec1, int[] rec2)
        {
            return Math.Max(rec1[0], rec2[0]) < Math.Min(rec1[2], rec2[2])
                &&
                Math.Max(rec1[1], rec2[1]) < Math.Min(rec1[3], rec2[3]);
        }
    }

这种几何图形问题,参考网上的答案。

原文地址:https://www.cnblogs.com/asenyang/p/9734819.html