Company: UKG_19july
Difficulty: medium
Minimum Area Problem Description Given a list of points described by their (x,y) coordinates on a two dimensional plane, construct a square surrounding at least a given number of points within the area enclosed. That area should be minimal and the square must meet the following conditions: The x-coordinates and y-coordinates of the points should be integers. The sides of the square should be parallel to coordinate axes. At least k of the given n points should lie strictly inside the square drawn. Strictly inside means that they cannot lie on a side of the square. For example, given n=3 points (1,1), (1,2) and (2,1) and k=3, surround all three points. The minimum area square is 9 units, going from the origin (0,0), to (3,3). Complete the function minArea in the editor below. The function must return the minimum possible area of the square that satisfies the constraints, as an integer. minArea has the following parameter(s): x[0]...x[n-1] : an array of integer x coordinates y[0]...y[n-1]