Practice
Leaderboard
Profile
Login
Logout
Code Practice
Code Practice
//Returns whether the given array of 2D points form a line. //Within the array are arrays of two numbers that can be accessed as follows: // arr[i][0] for the x-coordinate // and arr[i][1] for the y-coordinate //Examples: // isLinear([[0,0], [1,1]]) -> true // isLinear([[0,0], [1,1], [1, 2]]) -> false //Constraints: // 1 <= arr.length <= 1000 // -2147483647 <= arr[i][0] <= 2147483647 // -2147483647 <= arr[i][1] <= 2147483647 function isLinear(arr) { return false; }
Run Tests
Ran
0
tests