Algorithm · Upstart · Easy
Problem Given a collection of 2D points, each represented by an (x, y) coordinate pair, determine the axis-aligned bounding rectangle that encloses all of them. The rectangle is described by four integers: min_x, min_y, width, and height, where: min_x = smallest x-coordinate among all points min_y = smallest y-coordinate among all points width = max_x - min_x height = max_y - min_y You must implement the following function: The function receives a list of (x, y) pairs and…
Checking your access…