2.7 - Finding the MIN/MAX slope (of lines connecting points in 2D) and its Counting Version

Описание к видео 2.7 - Finding the MIN/MAX slope (of lines connecting points in 2D) and its Counting Version

Given a set of n points in 2D, we need to compute: (i) the pair of points such that the slope of the line segment connecting them is the MAXIMUM, (ii) the pair of points such that the slope of the line segment connecting them is the MINIMUM, and (iii) count the number of pairs such that the slope of the line segment connecting them is within a given range. All three problems can be solved in O(n log n) time. Part (iii) is based on a cleaver reduction to the inversion counting problem.

Комментарии

Информация по комментариям в разработке