Search
⌘K

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.

Comments

Your account is free and you can post anonymously if you choose.