Given arr, an array of N vertices (x,y) on the 2-dimensional XY axis, calculate the minimum area of K rectangles that we can use to completely enclose the said N vertices. Note that the rectangles' edges will be parallel to either the X or Y axis.
For example, if arr = [(1,1), (2,2), (6,3), (7,0)] and K=2, the minimum area of the 2 rectangles we are allowed to use is 4. This is because we have 1 rectangle of area 1 for the vertices (1,1) and (2,2) and another rectangle of area 3 for the vertices (6,3) and (7,0), which sums to 4.
I got this in an online assessment and of course couldn't solve it. It seemed pretty similar to 0/1 Knapsack to me, but i could not think of the recurrence formula to proceed with DP. Let me know if there are any more details required!