- 1. Because the stack only iterate through points once and exactly once, one point either push in or push in then pop out which take constant time k. So the total time is k*n which is O(n).
- 2. Consider a square ABDC, $p_0$ and $p_1$ is A and B. Then we go to C and push it. Then D, however B-C-D makes a right turn so we pop C then push D. Then we form a convex polygon with points A,B,D, but C is not inside the polygon.
- 4. Correct, this is a Ellipse with same focuses but different axis. The one with longer axis must contain the one with shorter axis but not vise versa. Thus, the point with highest sum must be a part of convex hull.
- 5. Wrong, same graph as question 2, C is the one with minimal distance sum however it is not a part of convex hull.