Question: I want solution in C++ or Java only Given N points on a 2D plane. Find the maximum number of points which can be covered


I want solution in C++ or Java only
Given N points on a 2D plane. Find the maximum number of points which can be covered by a rectangle with length x and breadth y. A point is said to be covered by a recatangle if it lies on the sides or inside the rectangle. Example 1: Input: N=5Points={(1,1),(2,3),(3,4),(2,4),(5,5)}x=2,y=2 output: 3 Explaination : Here we can see that this rectangle covers maximum points
Step by Step Solution
There are 3 Steps involved in it
To solve this problem we need to check each point as a potential bottomleft corner o... View full answer
Get step-by-step solutions from verified subject matter experts
