Back to questions

Straight Line Facebook Python Interview Question

Straight Line

Facebook Python Interview Question

Given an array of three points, return if the points are on a straight line, and if they are not.

Examples:

Example #1

Input: points = [[2, 1], [3, 4], [5, 6]]

Output: False

Example #2

Input: points = [[0, 0], [1, 1], [2, 2]]

Output: True

Input

(Python)

Output