(Translated by https://www.hiragana.jp/)
Check If two Line segments Intersect | Practice | GeeksforGeeks