Company: Flipkart DE IIT BHU
Difficulty: medium
Minimum Enclosed Trees Problem Description You are given the coordinates of multiple trees on a 2D plane and the coordinates of a polygon representing a house boundary. Your task is to find the minimum number of trees enclosed within the house boundary when the house is allowed to rotate freely around its centroid. You must consider all possible rotations and orientations of the house and output the configuration that minimizes the number of enclosed trees . Input Format N: Number of trees. Next N lines: Two integers x_i , y_i representing the coordinates of each tree. M: Number of vertices of the house polygon. Next M lines: Two integers hx_i , hy_i representing the coordinates of the polygon vertices in order. Output Format Minimum number of trees enclosed within the polygon for any possible rotation. (Optional) The rotation angle that achieves this minimum.