LeetCode --- 1232. Check If It Is a Straight Line 解题报告

Posted 杨鑫newlfe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1232. Check If It Is a Straight Line 解题报告相关的知识,希望对你有一定的参考价值。

You are given an array coordinatescoordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight line in the XY plane.

Example 1:

Input: coordinates = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]]
Output: true

Example 2:

 

Input: coordinates = [[1,1],[2,2],[3,4],[4,5],[5,6],[7,7]]
Output: false

Constraints:

  • 2 <= coordinates.length <= 1000
  • coordinates[i].length == 2

以上是关于LeetCode --- 1232. Check If It Is a Straight Line 解题报告的主要内容,如果未能解决你的问题,请参考以下文章

1232. Check If It Is a Straight Line

[leetcode 周赛 159] 1232 缀点成线

LeetCode 958. Check Completeness of a Binary Tree

LeetCode --- 1640. Check Array Formation Through Concatenation 解题报告

LeetCode --- 1640. Check Array Formation Through Concatenation 解题报告

[LeetCode] 2068. Check Whether Two Strings are Almost Equivalent