469. Convex Polygon
Last updated
Was this helpful?
Last updated
Was this helpful?
Given a list of points that form a polygon when joined sequentially, find if this polygon is convex .
Note:
There are at least 3 and at most 10,000 points.
Coordinates are in the range -10,000 to 10,000.
You may assume the polygon formed by given points is always a simple polygon. In other words, we ensure that exactly two edges intersect at each vertex, and that edges otherwise don't intersect each other.
Example 1:
Example 2: