May LeetCoding Challenge #Day8 #Check If It Is a Straight Line #Java

    May LeetCoding Challenge[Day8] - Check If It Is a Straight Line

    You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight line in the XY plane. Input: coordinates = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]] Output: true Input: coordinates = [[1,1],[2,2],[3,4],[4,5],[5,6],[7,7]] Output: false 1. 알고리즘을 해결하기 위해서 생각한 방법 - 우선 주어진 예제에서는 x와 y가 각각 증가하는 숫자에 대해서 보게 되었다. - [1,1]이 [2..