Search
⌘K
Get Premium
Leetcode 469. Convex Polygon
Given the ordered vertices of a simple polygon, determine whether every interior angle is <= 180° (i.e., the polygon is convex) by checking that the sign of the cross product for every consecutive triplet of vertices is consistent. Account for collinear adjacent points and ensure no reflex turns occur.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.