Find pairs in two spreads


I have two spreads with the same count:

0 3 8 5
3 0 4 6

Each two elements at the same index form a pair.


There will be combinations of pairs occuring twice, in switched order.


How can I find these doubles and throw them out so my spreads look like

0 8 5
3 4 6


this is a classic problem which is very hard to solve by basic spread operations. maybe describe a bit more what this should solve and how you ran into this problem. there might be a better solution which avoids this problem all together…