Self Crossing

From LeetCode. Self-intersecting polygon. Solve the geometry problem "Self Crossing".

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

Self Crossing

**From LeetCode.** Self-intersecting polygon. Solve the geometry problem "Self Crossing".