Create a function that returns True if an array of pairs are sufficient for a clear ordering of all items.
To illustrate:
clear_ordering([["D", "A"], ["C", "B"], ["A", "C"]]) ➞ True
# Since unequivocally: "D" < "A" < "C" < "B"
On the other hand:
clear_ordering([["D", "A"], ["B", "A"], ["C", "D"]]) ➞ False
# Since we know that "C" < "D" < "A", and we know "B" < "A"
# but we don't know anything about "B"s relationship with "C" or "D".
clear_ordering([["S", "T"], ["T", "U"], ["U", "V"]]) ➞ True
clear_ordering([["T", "S"], ["T", "U"], ["U", "V"], ["V", "W"]]) ➞ False
See Comments for a good visualization of the question.