大家都用什么放米?# Living
J*Y
1 楼
Describe an algorithm that takes an unsorted array of axis‐aligned
rectangles and returns any pair of rectangles that overlaps, if there is
such a pair. Axis‐alignedmeans that all the rectangle sides are either
parallel or perpendicular to the x‐ and
y‐axis. You can assume that each rectangle object has two variables in it:
the x‐y coordinates of the upper‐left corner and the bottom‐right corner.
rectangles and returns any pair of rectangles that overlaps, if there is
such a pair. Axis‐alignedmeans that all the rectangle sides are either
parallel or perpendicular to the x‐ and
y‐axis. You can assume that each rectangle object has two variables in it:
the x‐y coordinates of the upper‐left corner and the bottom‐right corner.