Convex Polygon
Try to solve the Convex Polygon problem.
Statement
You are given an array of points on the XY plane, where each point is represented as points[i]
=
Your task is to return TRUE if the polygon is
Note: It is guaranteed that the polygon formed by the given points is simple, meaning exactly two edges intersect at each vertex, and the edges do not intersect with each other elsewhere.
Constraints:
points.length
points[i].length == 2
, All the given points are unique.
Examples
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.