Challenge: Organizing a Lottery
Solve the Points and Segments Problem.
We'll cover the following
Problem
Points and Segments Problem
Given a set of points and a set of segments on a line, compute for each point the number of segments it’s contained in.
Input: A list of segments and a list of points.
Output: The number of segments containing each point.
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.