Check if points are collinear

From GeeksforGeeks. Collinearity check via slope or area. Solve the geometry problem "Check if points are collinear".

Examples
Input: [1,2,3]
Output: 0
Hints

Check if points are collinear

**From GeeksforGeeks.** Collinearity check via slope or area. Solve the geometry problem "Check if points are collinear".