Question:

Suppose you are given set A of n points in the Cartesian

Last updated: 12/1/2023

Suppose you are given set A of n points in the Cartesian

Suppose you are given set A of n points in the Cartesian coordinate system as follows A P P Each point in p points in t A has x a coordinate and a y coordinate However the y coordinate of all t 1 set A is the same For example p x y p x2 y p 3 y etc x3 Now you need to design an algorithm to determine the two losest points The running time of your algorithm should be Ofalogn a Briefly explain your strategy in solving this problem in Oinlogn running time You can draw a diagram ifneeded b Then develop your algorithm and write it in the pseudocode format similar to the algorithms discussed in the class Clearly er bound of your algorithm is O nlogn