Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

< Previous                  Next >

469. Convex Polygon (Medium)

Given a list of points that form a polygon when joined sequentially, find if this polygon is convex (Convex polygon definition).



  1. There are at least 3 and at most 10,000 points.
  2. Coordinates are in the range -10,000 to 10,000.
  3. You may assume the polygon formed by given points is always a simple polygon (Simple polygon definition). In other words, we ensure that exactly two edges intersect at each vertex, and that edges otherwise don't intersect each other.


Example 1:


Answer: True


Example 2:


Answer: False


Related Topics


You can’t perform that action at this time.