Let S = {(x1, y1),(x2, y2), · · · ,(xn, yn)} be a set of n points where all coordinates are real numbers. A point (xi , yi) is called a Pareto optimal point if for every other (xj , yj ) ∈ S, at least one of the following two inequalities hold:
xi > xj
yi >xj
(b) [ 10 Points ] If we are interested in finding only one Pareto optimal point in S, could you design a worst-case O(n)-time algorithm to find it? You must include an analysis of the O (n) running time of your algorithm.
(c) [ 10 Points ] If the points in S are sorted by their x coordinates and each point in S has a unique x coordinate, could you design a worst-case O (n)-time algorithm to find all Pareto optimal points in S? You must include an analysis of the running time of your algorithm.