Back to questions

Straight Line Facebook Python Interview Question

Straight Line

Facebook Python Interview Question

Given an array containing exactly three unique points, each represented as coordinate pairs (x, y) with no duplicates, determine whether these points lie on the same straight line. Return if they do, and otherwise.

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