In a nested list (like the one below) that is continuous, I want to remove duplicate entry where first and third are equal values. What is the most efficient way of doing this?
[[a, 1, a], [b, 1, b], [c, 2, d],[e, 4,g]
Return
[[c, 2, d],[e, 4,g]]
[x, y, x]. Is that correct?