Check If It Is a Straight Line
Try to solve the Check If It Is a Straight Line problem.
Statement
You are given an array, coordinates
, where each element in coordinates[i]
Constraints:
coordinates.length
coordinates[i].length
coordinates[i][0]
,coordinates[i][1]
coordinates
do not contain any duplicate points.
Examples
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.