Leetcode Check If Two Strings Are Equal Interval Graph